Menu

Invalid floating point operation

Beginners
pg18
2018-01-19
2018-01-29
  • pg18

    pg18 - 2018-01-19

    Hi,

    I'm encounterring an error any time I try to add an inverter to my system. Using the following code:

    New XYCurve.vv_curve npts=4
    ~ Yarray=(1.0,1.0,-1.0,-1.0)
    ~ XArray=(0.5,0.95,1.05,1.5)

    New InvControl.InvPVCtrl mode=VOLTVAR
    ~ voltage_curvex_ref=rated
    ~ vvc_curve1=vv_curve EventLog=yes

    The error I get when adding the above is (482) Error Encountered in Solve: Invalid floating point operation

    What could be the cause of this error? I have a large network of 216 houses (modeled as loads) each with a PV system at the same bus. Solving the code without the above inverter works without issue.

    As well, when the system is solved static with the above inverter it works, but the addition of simulation time (over 24 hours) causes the above error.

    Any help or insight is greatly apprecaited. Thank you!

     
  • pg18

    pg18 - 2018-01-19

    This is how I am performing the simulation in time. The goal was to perform it over a period of 24 hours.

    set controlmode=time
    set mode=daily number=24.0 hour=0.0 stepsize=1h

     
  • Roger Dugan

    Roger Dugan - 2018-01-19

    It could be any number of things. Possibly a divide-by-zero or an attempt to take the sqrt of a negative number.

    Try setting Number=1 and repeatedly execute Solve until you reach the time step where it fails. Inspect the solution and solution summary. Perhaps, there will be a better clue to the source of the problem.

     
    • pg18

      pg18 - 2018-01-22

      Even when setting Number=1 the error occurs and I'm unable to proceed further. I will take a look at the mathematical operations in the system and see if I can find the issue!

       
  • wsunderm1

    wsunderm1 - 2018-01-22

    I expect it might be either you didn't set the kV propery in PVSystem so that the InvControl knows what the proper voltage should be for 1.0 per-unit.

    Another possibility is that a PVSystem is disconnected from the rest of the circuit. A Show Isolated might point out the problem.

    If neither of those are the problem, would it be possible to upload your script to this forum?

    Or at the very least, provide your PVSystem definition (a representative one from your whole set of PVSystems) and the lines near calcv and solve.

    Thank you,

    Wes

     

    Last edit: wsunderm1 2018-01-22
  • pg18

    pg18 - 2018-01-22
    • The PV system is definition is established the same way for all. I should mention that at each bus where there is a PV system, I have also defined a house, as a load.

    In order to troubleshoot, the loadshapes are simply defined as a constant (with 24 data points; 1 for each hour).

    new PVSystem.PVA1_1 phases=1 bus=subA_11_1
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new load.houseA1_1 phases=1 bus=subA_11_1
    ~ kV=0.240 pf=1 duty=consumption

    • Using 'Show Isolated' I found no disconnects in the circuit

    • After all the PVsystem definitions, the bottom part of the code is written

    New XYCurve.vv_curve npts=4
    ~ Yarray=(1.0,1.0,-1.0,-1.0)
    ~ XArray=(0.5,0.95,1.05,1.5)

    New InvControl.InvPVCtrl mode=VOLTVAR
    ~ voltage_curvex_ref=rated
    ~ vvc_curve1=vv_curve EventLog=yes

    set controlmode=time
    set mode=daily number=24.0 hour=0.0 stepsize=1

    CalcVoltageBases

    solve

    BusCoords BusXY.csv

    Show Voltages
    Show Currents
    Show Powers
    Plot circuit
    plot loadshape object=solar
    plot loadshape object=consumption

    Thank you both for your replies!

     

    Last edit: pg18 2018-01-22
  • wsunderm1

    wsunderm1 - 2018-01-22

    One thing that comes to mind is possibly that there may be difficulty in determining the base voltages.

    I would recommend adding the following line just above your CalcVoltageBases:

    Set Voltagebases=[115, 4.16, .415]

    This would, for example, tell the OpenDSS that the voltages in your circuit are 115kV, 4.16kV, and 0.415kV (this last one is 0.24 times sqrt (3) to get the LL voltage needed in the voltagebases property).

    You would want to adjust it based on the actual nominal voltages of your equipment present in your circuit -- this is just an example.

    Thank you,

    Wes

     
    • pg18

      pg18 - 2018-01-22

      This worked wonderfully to fix some voltage issues I've been having, but my original problem persists.

      Based on what I've read from the Manual, I don't seem to grasp the difference between the use of mode=daily and mode=duty. Do both these codes not output the same result?

      1) Set controlmode=time
      Set mode=duty number=24 hour=0 stepsize=1h sec=0

      2) Set controlmode=time
      Set mode=daily number=24 hour=0 stepsize=1h sec=0

      Do you see any other issues with the code that is written above? Especially the PVSystem and load (house). I seem to be having the same error pop-up no matter how I define my InvControl. Even when I define it without the XYCurve.

       

      Last edit: pg18 2018-01-22
  • Roger Dugan

    Roger Dugan - 2018-01-22

    They couid produce the same results. The defaults are different but you could override the defaults and get pretty much the same result. For example, to use EnergyMeter elements in Duty cycle mode, you have to turn on the energymeter sampling:

    Set SampleEnergyMeters=Yes
    

    Here is the Help on this option.

    ~~~~
    Overrides default value for sampling EnergyMeter objects at the end of the solution loop. Normally Time and Duty modes do not automatically sample EnergyMeters whereas Daily, Yearly, M1, M2, M3, LD1 and LD2 modes do. Use this Option to turn sampling on or off
    ~~~~

    Also, if you are using demand interval data, the DI files are closed automatically in Daily mode. In Yearly mode, you have to explicitily close them with a CloseDI command.

     
  • wsunderm1

    wsunderm1 - 2018-01-22

    Sorry it didn't help with the floating point error.

    Other ideas:

    In your load definition and PVSystem definition, you indicate that these are single-phase devices. For example..

    new PVSystem.PVA1_1 phases=1 bus=subA_11_1 
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar
    

    Is the bus subA_11_1 in and of itself, a single phase bus? That is does it only have 1 node?

    I am used to seeing the bus definition for a single-phase device look something like this:

    bus=subA_11_1.1
    

    This in effect says to connect the element between node 1 of bus subA_11_1 and node 0 (ground) of the same bus.

    Another idea is to ensure that you have the very latest OpenDSS. The most recent versions, are always at:

    https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Distrib/

    The 32-bit version is in the folder under this called x86.
    The 64-bit version is in the folder under this called x64.

    As I understand it, installers are only made every so often, but the latest EXEs and DLLs and everything are at this location.

    Wes

     
    • pg18

      pg18 - 2018-01-22

      The overall system consists of a substation from which the three-phase feeder is split
      into three one-phase laterals constituting a neighborhood (of which my system has 3, with each neighbourhood having 72 PVSystems/House).

      Since the lines are single phase, is it necessary to define the bus at the end of the line as single phase as you've done above?

       
  • wsunderm1

    wsunderm1 - 2018-01-22

    I am almost certain that you have to do that.

    One way to verify is to do a snapshot solve (solve mode=snap), and then do a
    Show->Voltages->Voltages LN Nodes (from the menu).

    If you see three nodes (or more) on your bus subA_11_1, then that would confirm it -- that you need to use the node specifier for the single-phase lines.

    By convention, we use .1 to be equal to A phase, .2 to be equal to B phase, .3 to be equal to C phase, etc.

    By the way there is not (that I know of) a limit to the number of nodes (phases) that you can have on a bus in the OpenDSS. This is particularly handy for multiple circuits on the same physical pole, etc.

    Wes

     
    • pg18

      pg18 - 2018-01-22

      That's a very handy trick! I can confirm that there is only one node for bus subA_11_1 and for all other similar nodes. The system as a whole seems to be showing the number of nodes at each bus correctly.

       

      Last edit: pg18 2018-01-22
  • pg18

    pg18 - 2018-01-22

    Here's a truncated version of my code with only one SubUnit shown. Sorry for the huge block of text! Thanks for all your help!

    Clear

    //making the circuit
    new object=circuit.myckt1
    ~ basekv=120 pu=1.03

    // substation parallel transformer design
    new transformer.sub1 Phases=3 Windings=2
    ~ wdg=1 bus=sourcebus conn=delta kv=120 kva=47000 %r=18.5 // step down
    ~ wdg=2 bus=m0 conn=wye kv=25 kva=47000 %r=18.5
    ~ numtaps=32
    ~ mintap=0.9
    ~ maxtap=1.1

    new transformer.sub2 Phases=3 Windings=2
    ~ wdg=1 bus=sourcebus conn=delta kv=120 kva=47000 %r=18.5 // step down
    ~ wdg=2 bus=m0 conn=wye kv=25 kva=47000 %r=18.5
    ~ numtaps=32
    ~ mintap=0.9
    ~ maxtap=1.1

    // Sub Network A Transformers
    new transformer.TRA1 phases=1 windings=2 // step down transformer
    ~ wdg=1 bus=A1 kv=14.4 kva=75
    ~ wdg=2 bus=subA_11 kv=0.240 kva=75

    // making the transformers visible on the circuit plot
    set MarkTransformers=yes
    set TransMarkerCode=25
    set TransMarkerSize=5

    // desiging the loads for the main portion of the system
    new load.LATload1 bus=m1_1
    ~ kV=25 kva=3000 pf=0.90 model=1 // 3MVA lateral D

    new load.LATload2 bus=m1_2.1.2.3
    ~ kV=25 kva=3000 pf=0.90 model=1 // 3MVA lateral D

    new load.LATload3 bus=m2_1
    ~ kV=25 kva=2000 pf=0.95 model=1 // 2MVA lateral D

    new load.LATload4 bus=m2_2
    ~ kV=25 kva=2000 pf=0.95 model=1 // 2MVA lateral D

    new load.LATload5 bus=m3_1
    ~ kV=25 kva=2000 pf=0.90 model=1 // 2MVA lateral S

    // designing the lines
    redirect linegeometry.dss //import line codes

    // the lines for the 'main' system
    new line.LM1 bus1=m0 bus2=m1 // main cable line
    ~ linecode=336kcmil
    ~ length=1 unit=km

    new line.LM2_1 bus1=m1 bus2=m1_1 //3MVA lateral
    ~ linecode=0awg_3P
    ~ length=0.5 unit=km

    new line.LM2_2 bus1=m1 bus2=m1_2 //3MVA lateral
    ~ linecode=0awg_3P
    ~ length=0.5 unit=km

    new line.LM3 bus1=m1 bus2=m2 // main cable line
    ~ linecode=336kcmil
    ~ length=1 unit=km

    new line.LM4_1 bus1=m2 bus2=m2_1 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=1 unit=km

    new line.LM4_2 bus1=m2 bus2=m2_2 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=1 unit=km

    new line.LM5 bus1=m2 bus2=m3 // main cable line
    ~ linecode=336kcmil
    ~ length=1 unit=km

    new line.LM6 bus1=m3 bus2=m3_1 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=2 unit=km

    new line.LM7 bus1=m3 bus2=m4 // main cable line; it splits into three the subnetworks
    ~ linecode=336kcmil
    ~ length=2 unit=km

    //designing the 'main' lines for Subnetwork A

    new line.LA1 bus1=m4.1 bus2=A1
    ~ linecode=1P_pole
    ~ length=.250 unit=km

    //designing the subnetworks lines for A

    //sub unit A1
    new line.LA1_1 bus1=subA_11 bus2=subA_12
    ~ linecode=1P_lateral
    ~ length=.020 unit=km

    new line.LA1_2 bus1=subA_12 bus2=subA_13
    ~ linecode=1P_lateral
    ~ length=.020 unit=km

    new line.LA1_3 bus1=subA_13 bus2=subA_14
    ~ linecode=1P_lateral
    ~ length=.020 unit=km

    new line.LA1_4 bus1=subA_14 bus2=subA_15
    ~ linecode=1P_lateral
    ~ length=.020 unit=km

    // desiging the drop lines for subnet A

    // unit 1
    new line.SA1_1 bus1=subA_11 bus2=subA_11_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_2 bus1=subA_11 bus2=subA_11_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_3 bus1=subA_12 bus2=subA_12_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_4 bus1=subA_12 bus2=subA_12_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_5 bus1=subA_13 bus2=subA_13_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_6 bus1=subA_13 bus2=subA_13_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_7 bus1=subA_14 bus2=subA_14_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_8 bus1=subA_14 bus2=subA_14_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    new line.SA1_9 bus1=subA_15 bus2=subA_15_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km

    // defining the 'LoadShapes'
    // this loadshape define the PV functionality for a period of 24hrs
    new LoadShape.solar npts=24 interval=1.0
    ~ mult=(File=SolarLoadShape.csv) useactual=yes

    // this defines the house power consumption for a period of 24hrs
    new LoadShape.consumption npts=24 interval=1.0
    ~ mult=(File=HousePowerConsumption.csv) useactual=yes

    // PV in section A
    // subunit 1
    new PVSystem.PVA1_1 phases=1 bus=subA_11_1
    ~ kV=0.444 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_2 phases=1 bus=subA_11_2
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_3 phases=1 bus=subA_12_1
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_4 phases=1 bus=subA_12_2
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_5 phases=1 bus=subA_13_1
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_6 phases=1 bus=subA_13_2
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_7 phases=1 bus=subA_14_1
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_8 phases=1 bus=subA_14_2
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    new PVSystem.PVA1_9 phases=1 bus=subA_15_1
    ~ kV=0.240 kVA=3 irradiance=1 pf=1 duty=solar

    // marking the PV systems so you can see them on the map
    set MarkPVSystems=yes
    set PVMarkerCode=9

    // define all the houses as loads

    // Houses in section A
    // subunit 1
    new load.houseA1_1 phases=1 bus=subA_11_1
    ~ kV=0.440 pf=1 duty=consumption

    new load.houseA1_2 phases=1 bus=subA_11_2
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_3 phases=1 bus=subA_12_1
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_4 phases=1 bus=subA_12_2
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_5 phases=1 bus=subA_13_1
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_6 phases=1 bus=subA_13_2
    ~ kV=0.240 pf=1 duty=Consumption

    new load.houseA1_7 phases=1 bus=subA_14_1
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_8 phases=1 bus=subA_14_2
    ~ kV=0.240 pf=1 duty=consumption

    new load.houseA1_9 phases=1 bus=subA_15_1
    ~ kV=0.240 pf=1 duty=consumption

    //defining the controller
    New XYCurve.vv_curve npts=4
    ~ Yarray=(1.0,1.0,-1.0,-1.0)
    ~ XArray=(0.5,0.95,1.05,1.5)

    New InvControl.InvPVCtrl mode=VOLTVAR
    ~ voltage_curvex_ref=rated
    ~ vvc_curve1=vv_curve EventLog=yes

    Set controlmode=time
    Set mode=duty number=24 hour=0 stepsize=1h sec=0

    // determine the voltage bases for 'pu' values
    Set Voltagebases=[25, 14.4, .415]
    CalcVoltageBases

    solve

    // importing bus coordinates
    BusCoords BusXY.csv

    Plot circuit

    Show Voltages
    Show Currents
    Show Powers

    plot loadshape object=solar
    plot loadshape object=consumption

     

    Last edit: pg18 2018-01-22
  • wsunderm1

    wsunderm1 - 2018-01-22

    Can you post your linegeometry.dss file, as an attachment to a post? Or alternately, its' contents (enough of it to be able to process the previous posting of the portion of the circuit)?

     
    • pg18

      pg18 - 2018-01-22

      Yes, absolutely, sorry about that:

      // this file will be used to define the lines that will need to be used

      New LineCode.336kcmil nphases=3 //three phase main distribution line
      ~ R1=0.1902
      ~ X1=(2 pi * 60 * 0.00109) //used to convert inductance to reactance @ 60Hz
      ~ R0=0.5271
      ~ X0=(2 pi * 60 * 0.00337)
      ~ C1=11
      ~ C0=4.9
      ~ units=km
      ~ baseFreq=60

      New LineCode.0awg_3P nphases=3 //three phase lateral lines
      ~ R1=0.603
      ~ X1=(2 pi * 60 * 0.001213)
      ~ R0=0.978
      ~ X0=(2 pi * 60 * 0.003639)
      ~ C1=9.9
      ~ C0=4.73
      ~ units=km
      ~ baseFreq=60

      New LineCode.1P_lateral nphases=1 //single phase lateral
      ~ R1=0.535
      ~ X1=(2 pi * 60 * 0.00133)
      ~ C1=4.3
      ~ units=km
      ~ baseFreq=60

      New LineCode.1P_pole nphases=1 //single phase pole-pole
      ~ R1=0.27
      ~ X1=(2 pi * 60 * 0.00024)
      ~ C1=72
      ~ units=km
      ~ baseFreq=60

      New LineCode.1P_drop nphases=1 //single phase drop lines
      ~ R1=0.549
      ~ X1=(2 pi * 60 * 0.00023)
      ~ C1=55
      ~ units=km
      ~ baseFreq=60

       
  • wsunderm1

    wsunderm1 - 2018-01-22

    I think the issue is that you have a few buses that have 0 voltage on some of the phases and you are trying to connect 3-phase loads to them. Perhaps you meant to use a three-phase linecode?

    I get a floating point error even with the inverter out of the circuit when I go to calculate the powers (Show Powers kVA Elements)

    When I do a show VLN Nodes, I see 0 volts on some nodes of three of the buses as shown here:

    M1_1 .... 1 14.047 / -29.5 0.97321 25.000 1-2 24.712 / 0.8 0.98848
    - 2 14.45 / -149.8 1.0011 25.000 2-3 25.05 / -119.7 1.002
    - 3 14.482 / 90.3 1.0033 25.000 3-1 24.681 / 119.9 0.98725
    M1_2 .... 1 14.047 / -29.5 0.97321 25.000 1-2 24.712 / 0.8 0.98848
    - 2 14.45 / -149.8 1.0011 25.000 2-3 25.05 / -119.7 1.002
    - 3 14.482 / 90.3 1.0033 25.000 3-1 24.681 / 119.9 0.98725
    M2_1 .... 1 14.014 / -29.5 0.97095 25.000 1-2 14.014 / -29.5 0.56058
    ** - 2 0 / 0.0 0 25.000 2-3 0 / 0.0 0
    - 3 0 / 0.0 0 25.000 3-1 14.014 / 150.5 0.56058
    M2_2 .... 1 14.014 / -29.5 0.97095 25.000 1-2 14.014 / -29.5 0.56058
    ** - 2 0 / 0.0 0 25.000 2-3 0 / 0.0 0
    - 3 0 / 0.0 0 25.000 3-1 14.014 / 150.5 0.56058

    M3_1 .... 1 13.991 / -29.4 0.96932 25.000 1-2 13.991 / -29.4 0.55964
    ** - 2 0 / 0.0 0 25.000 2-3 0 / 0.0 0
    - 3 0 / 0.0 0 25.000 3-1 13.991 / 150.6 0.55964**
    M1 ...... 1 14.066 / -29.5 0.97456 25.000 1-2 24.745 / 0.8 0.98979
    - 2 14.469 / -149.8 1.0024 25.000 2-3 25.083 / -119.7 1.0033
    - 3 14.501 / 90.2 1.0046 25.000 3-1 24.715 / 119.8 0.98858
    M2 ...... 1 14.027 / -29.5 0.97179 25.000 1-2 24.728 / 0.8 0.98911

    You specified these lines as follows:

    new line.LM4_1 bus1=m2.1 bus2=m2_1 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=1 unit=km
    new line.LM4_2 bus1=m2.1 bus2=m2_2 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=1 unit=km
    new line.LM6 bus1=m3 bus2=m3_1 //2MVA lateral
    ~ linecode=1P_pole
    ~ length=2 unit=km

    And here are the load definitions. Note that by not specifying the number of phases, it is defaulting to 3.

    new load.LATload3 bus=m2_1
    ~ kV=25 kva=2000 pf=0.95 model=1 // 2MVA lateral D
    new load.LATload4 bus=m2_2
    ~ kV=25 kva=2000 pf=0.95 model=1 // 2MVA lateral D

    So you can see that nodes 2 and 3 on these buses have 0 voltage on them. And that is where the divide by zero is coming from.

    So I would change the line codes being used or change the definitions of the loads to be single phase (although 2MW is awfully large for a single-phase load).

    I am attaching the VLN node file so you can see the 0 voltages on some of the nodes a bit better than from the copy/paste above.

    Hope this is helpful.

    Wes

     
    • pg18

      pg18 - 2018-01-22

      Unfortauntely, it seems the floating point error still persists. I've identified the loads as single phase.

      In the system design: LATload3, LATload4 and LATload5 are intentionally made to be single phase, 2MW loads.

      I did have one more qustion if you don't mind.

      For LATload3, LATload4 and LATload5, there is some issue where there is no power at the wire or the load.

      "Line.LM4_1" 1 0.0 0.0 0.0
      "Line.LM4_2" 1 0.0 0.0 0.0
      "Line.LM6" 1 0.0 0.0 0.0

      "Load.LATLOAD1" 1 2700.5 1307.8 -0.3 -0.1 -0.3 -0.0
      "Load.LATLOAD2" 1 2700.5 1307.8 -0.3 -0.1 -0.3 -0.0
      "Load.LATLOAD3" 1 0.0 0.0 0.0 0.0 0.0 0.0
      "Load.LATLOAD4" 1 0.0 0.0 0.0 0.0 0.0 0.0
      "Load.LATLOAD5" 1 0.0 0.0 0.0 0.0 0.0 0.0

      Could the issue possibly be at bus M2 and M3 that I've connected a single phase wire to a three phase wire?

       

      Last edit: pg18 2018-01-22
  • pg18

    pg18 - 2018-01-23

    A little update, it seems as though there is an issue for my three single phase lateral loads. As mentioned in my previous post, I can't seem to obtain power at the loads.

    When making them three phase, it seems to work correctly, but when using a single phase line and a single phase load, it no longer works. I tried adjusting the line code and declaring my lines as single phase, explicilty in my main file, but it doesn't seem to work.

     
  • wsunderm1

    wsunderm1 - 2018-01-24

    Can you post a small portion of your present script that shows the problem?

    I think the issue is a mis-understanding of how to use the .1, .2, or .3 to specify single-phase.

     
    • pg18

      pg18 - 2018-01-24

      Hey Wes, you're correct. While looking through some of the IEEE examples it seems I misunderstood how to denote the phases for lines and loads.

      Here is a portion of the code as it is currently. If you have any corrections I would appreaciate it! The linecodes imported is unchaged from before (posted earlier in this thread). The attached picture is the portion this code below is trying to model.

      // desiging the loads for the main portion of the system
      New Load.LATload1 Phases=3 Conn=wye Bus1=m1_1.1.2.3
      ~ kV=25 kw=3000 pf=0.90

      New Load.LATload2 Phases=3 Conn=wye Bus1=m1_2.1.2.3
      ~ kV=25 kw=3000 pf=0.90

      New Load.LATload3 Phases=1 Conn=wye Bus1=m2_1.1
      ~ kw=2000 pf=0.95

      New Load.LATload4 Phases=1 Conn=wye Bus1=m2_2.2
      ~ kw=2000 pf=0.95

      New Load.LATload5 Phases=1 Conn=wye Bus1=m3_1.3
      ~ kw=2000 pf=0.90

      redirect linegeometryTEST.dss //import line codes

      // the lines for the 'main' system
      New Line.LM1 Phases=3 Bus1=m0.1.2.3 Bus2=m1.1.2.3
      ~ linecode=336kcmil
      ~ length=1 unit=km

      New Line.LM2_1 Phases=3 Bus1=m1.1.2.3 Bus2=m1_1.1.2.3
      ~ linecode=0awg_3P
      ~ length=0.5 unit=km

      New Line.LM2_2 Phases=3 Bus1=m1.1.2.3 Bus2=m1_2.1.2.3
      ~ linecode=0awg_3P
      ~ length=0.5 unit=km

      New Line.LM3 Phases=3 Bus1=m1.1.2.3 Bus2=m2.1.2.3
      ~ linecode=336kcmil
      ~ length=1 unit=km

      New Line.LM4_1 Phases=1 Bus1=m2.1 Bus2=m2_1.1
      ~ linecode=1P_lateral
      ~ length=1 unit=km

      New Line.LM4_2 Phases=1 Bus1=m2.2 Bus2=m2_2.2
      ~ linecode=1P_lateral
      ~ length=1 unit=km

      New Line.LM5 Phases=3 Bus1=m2.1.2.3 Bus2=m3.1.2.3
      ~ linecode=336kcmil
      ~ length=1 unit=km

      New Line.LM6_1 Phases=1 Bus1=m3.3 Bus2=m3_1.3
      ~ linecode=1P_lateral
      ~ length=2 unit=km

      New Line.LM7 Phases=3 Bus1=m3.1.2.3 Bus2=m4.1.2.3
      ~ linecode=336kcmil
      ~ length=2 unit=km

      Thanks for you all your help!

       
  • wsunderm1

    wsunderm1 - 2018-01-25

    I am not sure if I have created the same circuit as you are having problems with, but I edited the case to include only what you showed (plus the previous transformers, source, and linecode definitions), and I get power being consumed by every load.

    Please check the copy/pasted master.dss. I tried to attach it as a file, but it wouldn't let me do that.

    Clear
    //making the circuit
    new object=circuit.myckt1
    ~ basekv=120 pu=1.03
    // substation parallel transformer design
    new transformer.sub1 Phases=3 Windings=2
    ~ wdg=1 bus=sourcebus conn=delta kv=120 kva=47000 %r=18.5 // step down
    ~ wdg=2 bus=m0 conn=wye kv=25 kva=47000 %r=18.5
    ~ numtaps=32
    ~ mintap=0.9
    ~ maxtap=1.1
    new transformer.sub2 Phases=3 Windings=2
    ~ wdg=1 bus=sourcebus conn=delta kv=120 kva=47000 %r=18.5 // step down
    ~ wdg=2 bus=m0 conn=wye kv=25 kva=47000 %r=18.5
    ~ numtaps=32
    ~ mintap=0.9
    ~ maxtap=1.1
    // Sub Network A Transformers
    new transformer.TRA1 phases=1 windings=2 // step down transformer
    ~ wdg=1 bus=A1 kv=14.4 kva=75
    ~ wdg=2 bus=subA_11 kv=0.240 kva=75
    // making the transformers visible on the circuit plot
    set MarkTransformers=yes
    set TransMarkerCode=25
    set TransMarkerSize=5
    // designing the lines
    New LineCode.336kcmil nphases=3 //three phase main distribution line
    ~ R1=0.1902
    ~ X1=(2 pi * 60 * 0.00109) //used to convert inductance to reactance @ 60Hz
    ~ R0=0.5271
    ~ X0=(2 pi * 60 * 0.00337)
    ~ C1=11
    ~ C0=4.9
    ~ units=km
    ~ baseFreq=60
    New LineCode.0awg_3P nphases=3 //three phase lateral lines
    ~ R1=0.603
    ~ X1=(2 pi * 60 * 0.001213)
    ~ R0=0.978
    ~ X0=(2 pi * 60 * 0.003639)
    ~ C1=9.9
    ~ C0=4.73
    ~ units=km
    ~ baseFreq=60
    New LineCode.1P_lateral nphases=1 //single phase lateral
    ~ R1=0.535
    ~ X1=(2 pi * 60 * 0.00133)
    ~ C1=4.3
    ~ units=km
    ~ baseFreq=60
    New LineCode.1P_pole nphases=1 //single phase pole-pole
    ~ R1=0.27
    ~ X1=(2 pi * 60 * 0.00024)
    ~ C1=72
    ~ units=km
    ~ baseFreq=60
    New LineCode.1P_drop nphases=1 //single phase drop lines
    ~ R1=0.549
    ~ X1=(2 pi * 60 * 0.00023)
    ~ C1=55
    ~ units=km
    ~ baseFreq=60

    // desiging the loads for the main portion of the system
    New Load.LATload1 Phases=3 Conn=wye Bus1=m1_1.1.2.3
    ~ kV=25 kw=3000 pf=0.90
    New Load.LATload2 Phases=3 Conn=wye Bus1=m1_2.1.2.3
    ~ kV=25 kw=3000 pf=0.90
    New Load.LATload3 Phases=1 Conn=wye Bus1=m2_1.1
    ~ kw=2000 pf=0.95
    New Load.LATload4 Phases=1 Conn=wye Bus1=m2_2.2
    ~ kw=2000 pf=0.95
    New Load.LATload5 Phases=1 Conn=wye Bus1=m3_1.3
    ~ kw=2000 pf=0.90
    !redirect linegeometryTEST.dss //import line codes
    // the lines for the 'main' system
    New Line.LM1 Phases=3 Bus1=m0.1.2.3 Bus2=m1.1.2.3
    ~ linecode=336kcmil
    ~ length=1 unit=km
    New Line.LM2_1 Phases=3 Bus1=m1.1.2.3 Bus2=m1_1.1.2.3
    ~ linecode=0awg_3P
    ~ length=0.5 unit=km
    New Line.LM2_2 Phases=3 Bus1=m1.1.2.3 Bus2=m1_2.1.2.3
    ~ linecode=0awg_3P
    ~ length=0.5 unit=km
    New Line.LM3 Phases=3 Bus1=m1.1.2.3 Bus2=m2.1.2.3
    ~ linecode=336kcmil
    ~ length=1 unit=km
    New Line.LM4_1 Phases=1 Bus1=m2.1 Bus2=m2_1.1
    ~ linecode=1P_lateral
    ~ length=1 unit=km
    New Line.LM4_2 Phases=1 Bus1=m2.2 Bus2=m2_2.2
    ~ linecode=1P_lateral
    ~ length=1 unit=km
    New Line.LM5 Phases=3 Bus1=m2.1.2.3 Bus2=m3.1.2.3
    ~ linecode=336kcmil
    ~ length=1 unit=km
    New Line.LM6_1 Phases=1 Bus1=m3.3 Bus2=m3_1.3
    ~ linecode=1P_lateral
    ~ length=2 unit=km
    New Line.LM7 Phases=3 Bus1=m3.1.2.3 Bus2=m4.1.2.3
    ~ linecode=336kcmil
    ~ length=2 unit=km

    // the lines for the 'main' system
    //designing the 'main' lines for Subnetwork A
    new line.LA1 bus1=m4.1 bus2=A1
    ~ linecode=1P_pole
    ~ length=.250 unit=km
    //designing the subnetworks lines for A
    //sub unit A1
    new line.LA1_1 bus1=subA_11 bus2=subA_12
    ~ linecode=1P_lateral
    ~ length=.020 unit=km
    new line.LA1_2 bus1=subA_12 bus2=subA_13
    ~ linecode=1P_lateral
    ~ length=.020 unit=km
    new line.LA1_3 bus1=subA_13 bus2=subA_14
    ~ linecode=1P_lateral
    ~ length=.020 unit=km
    new line.LA1_4 bus1=subA_14 bus2=subA_15
    ~ linecode=1P_lateral
    ~ length=.020 unit=km
    // desiging the drop lines for subnet A
    // unit 1
    new line.SA1_1 bus1=subA_11 bus2=subA_11_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_2 bus1=subA_11 bus2=subA_11_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_3 bus1=subA_12 bus2=subA_12_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_4 bus1=subA_12 bus2=subA_12_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_5 bus1=subA_13 bus2=subA_13_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_6 bus1=subA_13 bus2=subA_13_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_7 bus1=subA_14 bus2=subA_14_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_8 bus1=subA_14 bus2=subA_14_2
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    new line.SA1_9 bus1=subA_15 bus2=subA_15_1
    ~ linecode=1P_drop
    ~ length=0.020 unit=km
    // defining the 'LoadShapes'
    // this loadshape define the PV functionality for a period of 24hrs
    new LoadShape.solar npts=24 interval=1.0
    ~ mult=(File=SolarLoadShape.csv) useactual=yes
    // this defines the house power consumption for a period of 24hrs
    new LoadShape.consumption npts=24 interval=1.0
    ~ mult=(File=HousePowerConsumption.csv) useactual=yes
    // PV in section A
    // subunit 1
    !Set controlmode=time
    !Set mode=duty number=24 hour=0 stepsize=1h sec=0
    // determine the voltage bases for 'pu' values
    Set Voltagebases=[120,25, 14.4, .415]
    CalcVoltageBases
    solve mode=snap

     
  • pg18

    pg18 - 2018-01-29

    Great, thanks for your help Wes! You've helped me learn a lot!

     

Log in to post a comment.