Menu

Problem using Relay and swtcontrol to open a Line

Beginners
B.C
2015-01-21
2015-01-23
  • B.C

    B.C - 2015-01-21

    Hello all:

    I would like to trip Line.CB which represents a breaker controlled by Relay_1. However, my setup doesn't seem to work. I make sure that the current monitored exceeds 'PhaseInst=10'. I have tried using both; 'swtcontrol' and 'relay' and neither achieve what I'm looking for. Below is the test system. Comments and suggestions are appreciated. Thank you.

    Clear
    New Object = circuit.Case1
    Edit Vsource.Source BasekV=132 pu=1 ISC3=3000000 ISC1=2500000 angle=0 phase=3
    set DefaultBaseFrequency = 60
    Set tolerance = 0.001
    Calcvoltagebases

    // specifications
    New xfmrcode.ST.1X phases=3 kVs=[ 115 13.8 ] kVA=100000 conns=[ delta wye ]
    ~ %Rs=[0.813 0.813] xhl=14.912 MaxTap=1.12 MinTap=0.88 NumTaps=32 Tap=1 %noloadloss=0.02

    New xfmrcode.T.X1 Windings=2 xhl=6.0906 %imag=0 %noloadloss=0.02
    ~ wdg=1 conn=delta kv=13.8 kva=10000 %r=0.46385 XLT=0
    ~ wdg=2 conn=wye kv=0.48 kva=10000 %r=0.46385 XHT=0

    New Linecode.P1 nphase=3 r1=0.003 x1=1.56e-05 r0=3.68e-05 x0=0.0002011 c1=0.00096384 c0=0.00096384 units=Ft baseFreq=60
    New Linecode.S1 r1=2.58e-05 x1=3.38e-05 r0=0.0002994 x0=0.0001392 c1=0 c0=0 units=Ft baseFreq=60

    // system
    New Transformer.ST.1 buses=[sourcebus node_1] basefreq=60 sub=Yes xfmrcode=ST.1X
    New Line.pri.1 bus1=node_2 bus2=node_3 length=251 units=Ft Linecode=P1
    New Transformer.T.1 buses=[node_3 node_4] basefreq=60 xfmrcode=T.X1
    New Line.sec bus1=node_4 bus2=node_5 length=251 nphase=3 units=Ft Linecode=S1
    new loadshape.day npts=24 interval=1.0
    ~ mult=(0.3 .3 .3 .35 .36 .39 .41 .48 .52 .59 .62 .94 .87 .91 .95 .95 1.0 .98 .94 .92 .61 .60 .51 .44)
    new load.loadvar bus1=node_5 phases=3 kv=.48 kw=1000.0 pf=1 model=1
    ~ class=1 daily=day status=variable
    New Monitor.Mon_1 element=Transformer.T.1 terminal=1 mode=0

    // AREA WITH PROBLEM
    New Line.CB phases=3 bus1=node_1 bus2=node_2 r1=0.001 x1=0 switch=y

    // test-1
    // New swtcontrol.swCB action=open delay=0 switchedobj=Line.CB enabled=true
    // test-2
    New Relay.Relay_1 action=open MonitoredObj=Line.CB MonitoredTerm=1 Type=Current PhaseInst=10 enabled=true

    // Simulation setup
    set mode=duty
    set stepsize=1h
    set number=25
    set controlmode=static
    set time=(0, 0)

     
  • Davis Montenegro

    Hi,

    Well there are several problems:

    1. When declaring the object the control action doesn't take any effect. You have to do it later, for example lets start from your declaration of swcontrol:

    // test-1
    New swtcontrol.swCB action=open delay=0 switchedobj=Line.CB enabled=true
    solve
    //for changing the state of the swtcontrol do
    swtcontrol.swCB.action=open
    //Simulation setup...
    ...
    Solve

    Try this and see what happens

    Best regards

    Davis

     
  • B.C

    B.C - 2015-01-22

    Hi Davis,

    Thanks for the response. I will give it a try. How about the relays? I assume relays need to work automatically depending on a provided time delay or curve. Can you give me an example?

    Best,
    B.C

     

    Last edit: B.C 2015-01-22
  • Davis Montenegro

    Hi,

    In this case better use the recloser, this device will responde according to the curve you define. Same with relays. However I've tried these only in time mode and the response is very good.

    Best regards

    Davis

     
  • B.C

    B.C - 2015-01-22

    I will eventually need to use relays (32, 47, and so on) for the problem that I'm trying to solve. reclosers would only do the trick for breakers and switches. Is there a way to make the relays work?

    B.C

     
  • Roger Dugan

    Roger Dugan - 2015-01-23

    I did some editing to your script and got it do run. The RELAY object seems to be working OK. Study what I've done and see if you can make it do what you want to do. My comments are in ALL CAPS.

    Clear 
    New Object = circuit.Case1
    Edit Vsource.Source BasekV=132 pu=1 ISC3=3000000 ISC1=2500000 angle=0 phase=3
    !! set DefaultBaseFrequency = 60
    !! Set tolerance = 0.001 
    !! THIS WON'T WORK UNTIL YOU HAVE ALL THE BUSES DEFINED Calcvoltagebases
    
    // specifications  ERROR IN HV VOLTAGE
    !-New xfmrcode.ST.1X phases=3 kVs=[ 115 13.8 ] kVA=100000 conns=[ delta wye ]
    New xfmrcode.ST.1X phases=3 kVs=[ 138 13.8 ] kVA=100000 conns=[ delta wye ]
    ~ %Rs=[0.813 0.813] xhl=14.912 MaxTap=1.12 MinTap=0.88 NumTaps=32 Tap=1 %noloadloss=0.02
    
    New xfmrcode.T.X1 Windings=2 xhl=6.0906 %imag=0 %noloadloss=0.02
    ~ wdg=1 conn=delta kv=13.8 kva=10000 %r=0.46385   ! NOT NEEDED XLT=0 
    ~ wdg=2 conn=wye   kv=0.48 kva=10000 %r=0.46385   ! NOT NEEDED XHT=0
    
    New Linecode.P1 nphase=3  r1=0.003 x1=1.56e-05 r0=3.68e-05 x0=0.0002011 c1=0.00096384 c0=0.00096384 units=Ft baseFreq=60
    New Linecode.S1 NPHASES=3 r1=2.58e-05 x1=3.38e-05 r0=0.0002994 x0=0.0001392 c1=0 c0=0 units=Ft baseFreq=60
    
    // system 
    
    // NOTE: 60 HZ WILL BE ASSUMED; DON'T HAVE TO SPECIFY "BASEFREQ=60"
    // SHOULD AVOID "." IN DEVICE NAMES.  WILL SOMETIMES CONFUSE PARSER
    New Transformer.ST.1 buses=[sourcebus node_1] basefreq=60 sub=Yes xfmrcode=ST.1X
    New Line.pri.1 bus1=node_2 bus2=node_3 length=251 units=Ft Linecode=P1
    New Transformer.T.1 buses=[node_3 node_4] basefreq=60 xfmrcode=T.X1
    !-New Line.sec bus1=node_4 bus2=node_5 length=251 nphase=3 units=Ft Linecode=S1 ! DEFINE THE PHASES IN THE LINECODE DEFINITION
    New Line.sec bus1=node_4 bus2=node_5 length=251 units=Ft Linecode=S1 
    
    
    new loadshape.day npts=24 interval=1.0
    ~ mult=(0.3 .3 .3 .35 .36 .39 .41 .48 .52 .59 .62 .94 .87 .91 .95 .95 1.0 .98 .94 .92 .61 .60 .51 .44)
    
    // DAILY IS ASSIGNED; SO SOLUTION MODE SHOULD BE DAILY NOT DUTY
    new load.loadvar bus1=node_5 phases=3 kv=.48 kw=1000.0 pf=1 model=1
    ~ class=1 daily=day status=variable
    
    New Monitor.Mon_1 element=Transformer.T.1 terminal=1 mode=0
    
    // AREA WITH PROBLEM
    New Line.CB phases=3 bus1=node_1 bus2=node_2 r1=0.001 x1=0 switch=y  !! SETTING SWITCH=Y OVERRIDES R1, X1 DEFINITION SEE HELP.
    
    // test-1
    // New swtcontrol.swCB action=open delay=0 switchedobj=Line.CB enabled=true
    // test-2
    
    !---New Relay.Relay_1 action=open MonitoredObj=Line.CB MonitoredTerm=1 Type=Current PhaseInst=10 enabled=true
    // HAVE TO DEFINE A TCC CURVE FOR THE PHASE AT LEAST BECAUSE DEFAULT IS NONE; WE'LL USE D CURVE DEFINED WITH NEW CIRCUIT
    // OPEN ACTION LOCKS RELAY OUT
    New Relay.Relay_1 MonitoredObj=Line.CB MonitoredTerm=1 Type=Current PHASECURVE=D PHASETRIP=30 PhaseInst=35 enabled=true
    
    SET VOLTAGEBASES=[138, 13.8, 0.48]
    CALCVOLTAGEBASES
    
    SOLVE   ! SNAPSHOT MODE
    
    SHOW VOLT LN NODE  ! JUST TO CHECK TO SEE IF IT WORKS
    SHOW EVENTLOG      ! CHECK TO SEE IF RELAY TRIPPED (IT WENT TO LOCKOUT) 
    
    // Simulation setup
    // LET'S DO SOMETHING MORE INTERESTING
    RESET EVENTLOG
    RELAY.RELAY_1.ACTION=CLOSE      ! IT WAS LOCKED OUT BECAUSE PREVIOUS SOLUTION WAS AT PEAK LOAD 
    SET MODE=DAILY STEPSIZE=1h NUMBER=24 CONTROLMODE=STATIC
    
    SOLVE
    SHOW MON MON_1
    
    // OR SOMETHING MAYBE EVEN MORE INTERESTING:  PUT A FAULT ON NODE_3 DURING THE SECOND DAY.
    NEW FAULT.F1 PHASES=1 BUS1=NODE_3.1 enabled=NO
    RESET EVENTLOG
    RESET FAULTS
    RELAY.RELAY_1.ACTION=close      ! IT WAS LOCKED OUT BECAUSE PREVIOUS SOLUTION LOCKED IT OUT 
    RELAY.RELAY_1.PHASETRIP=200 PHASEINST=400  ! RAISE THE TRIP LEVEL SO IT ONLY TRIPS ON FAULTS
    // SOLVE 1.5 DAYS
    SOLVE MODE=DAILY STEPSIZE=1h NUMBER=36 CONTROLMODE=STATIC
    // APPLY FAULT AND SOLVE 1/2 DAY
    FAULT.F1.ENABLED=Y
    SOLVE NUMBER=1
    FAULT.F1.ENABLE=NO  ! REPAIR THE FAULT
    RELAY.RELAY_1.ACTION=CLOSE  ! RECLOSE THE BREAKER
    SOLVE NUMBER=11
    
    
    SHOW MON MON_1
    SHOW EVENTLOG
    
    /*
    set mode=duty
    set stepsize=1h
    set number=25
    set controlmode=static
    set time=(0, 0)
    */
    
     
  • B.C

    B.C - 2015-01-23

    Dear Roger and Davis,

    Thank you very much for your help. I'm sure this discussion will help others the same way it is helping me.

    I have other questions:

    1) What would be the problem with defining the phases in the line rather than the nphases in the linecode?

    2) Should the solution mode always match the load type (daily, duty, ...)?

    3) Would there be any special changes to solve using mode=time and mode=dynamic?

    Best,
    B.C

     
  • Roger Dugan

    Roger Dugan - 2015-01-23
    1. You could do either or both. But to stay sane, you might want to settle on one way. OpenDSS is set up to define the number of phases and impedances in the LineCode. Then you refer to the definition from the LINE definition. Remember that each command line is processed from left-to-right. In your original definition of the LINE, you set "nphases=3" which should be "phases=3" and then you assign the LINECODE later. Thus, the definition in the LINECODE overrides the previous definition in the LINE definition.

    2. Daily, duty, etc is not the load type. These properties of the LOAD object point to LOADSHAPE objects that will be used for sequential-time simulations in the corresponding mode. So if you want the load to vary in a DAILY mode simulation, make sure something is assigned to the Daily property of the LOAD object.

    3. Perhaps minor ones depending on what you're doing. In Time mode, you are expected script load changes etc, except the program will do some things automatically like incrementing time and sampling results. Dynamics mode causes some models to change, such as generators.

     

Log in to post a comment.

MongoDB Logo MongoDB