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
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
ClearNewObject=circuit.Case1EditVsource.SourceBasekV=132pu=1ISC3=3000000ISC1=2500000angle=0phase=3!!setDefaultBaseFrequency=60!!Settolerance=0.001!!THISWON'TWORKUNTILYOUHAVEALLTHEBUSESDEFINEDCalcvoltagebases// specifications ERROR IN HV VOLTAGE!-Newxfmrcode.ST.1Xphases=3kVs=[11513.8]kVA=100000conns=[deltawye]Newxfmrcode.ST.1Xphases=3kVs=[13813.8]kVA=100000conns=[deltawye]~%Rs=[0.8130.813]xhl=14.912MaxTap=1.12MinTap=0.88NumTaps=32Tap=1%noloadloss=0.02Newxfmrcode.T.X1Windings=2xhl=6.0906%imag=0%noloadloss=0.02~wdg=1conn=deltakv=13.8kva=10000%r=0.46385!NOTNEEDEDXLT=0~wdg=2conn=wyekv=0.48kva=10000%r=0.46385!NOTNEEDEDXHT=0NewLinecode.P1nphase=3r1=0.003x1=1.56e-05r0=3.68e-05x0=0.0002011c1=0.00096384c0=0.00096384units=FtbaseFreq=60NewLinecode.S1NPHASES=3r1=2.58e-05x1=3.38e-05r0=0.0002994x0=0.0001392c1=0c0=0units=FtbaseFreq=60// system // NOTE: 60 HZ WILL BE ASSUMED; DON'T HAVE TO SPECIFY "BASEFREQ=60"// SHOULD AVOID "." IN DEVICE NAMES. WILL SOMETIMES CONFUSE PARSERNewTransformer.ST.1buses=[sourcebusnode_1]basefreq=60sub=Yesxfmrcode=ST.1XNewLine.pri.1bus1=node_2bus2=node_3length=251units=FtLinecode=P1NewTransformer.T.1buses=[node_3node_4]basefreq=60xfmrcode=T.X1!-NewLine.secbus1=node_4bus2=node_5length=251nphase=3units=FtLinecode=S1!DEFINETHEPHASESINTHELINECODEDEFINITIONNewLine.secbus1=node_4bus2=node_5length=251units=FtLinecode=S1newloadshape.daynpts=24interval=1.0~mult=(0.3.3.3.35.36.39.41.48.52.59.62.94.87.91.95.951.0.98.94.92.61.60.51.44)// DAILY IS ASSIGNED; SO SOLUTION MODE SHOULD BE DAILY NOT DUTYnewload.loadvarbus1=node_5phases=3kv=.48kw=1000.0pf=1model=1~class=1daily=daystatus=variableNewMonitor.Mon_1element=Transformer.T.1terminal=1mode=0// AREA WITH PROBLEMNewLine.CBphases=3bus1=node_1bus2=node_2r1=0.001x1=0switch=y!!SETTINGSWITCH=YOVERRIDESR1,X1DEFINITIONSEEHELP.// test-1// New swtcontrol.swCB action=open delay=0 switchedobj=Line.CB enabled=true// test-2!---NewRelay.Relay_1action=openMonitoredObj=Line.CBMonitoredTerm=1Type=CurrentPhaseInst=10enabled=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 OUTNewRelay.Relay_1MonitoredObj=Line.CBMonitoredTerm=1Type=CurrentPHASECURVE=DPHASETRIP=30PhaseInst=35enabled=trueSETVOLTAGEBASES=[138,13.8,0.48]CALCVOLTAGEBASESSOLVE!SNAPSHOTMODESHOWVOLTLNNODE!JUSTTOCHECKTOSEEIFITWORKSSHOWEVENTLOG!CHECKTOSEEIFRELAYTRIPPED(ITWENTTOLOCKOUT)// Simulation setup// LET'S DO SOMETHING MORE INTERESTINGRESETEVENTLOGRELAY.RELAY_1.ACTION=CLOSE!ITWASLOCKEDOUTBECAUSEPREVIOUSSOLUTIONWASATPEAKLOADSETMODE=DAILYSTEPSIZE=1hNUMBER=24CONTROLMODE=STATICSOLVESHOWMONMON_1// OR SOMETHING MAYBE EVEN MORE INTERESTING: PUT A FAULT ON NODE_3 DURING THE SECOND DAY.NEWFAULT.F1PHASES=1BUS1=NODE_3.1enabled=NORESETEVENTLOGRESETFAULTSRELAY.RELAY_1.ACTION=close!ITWASLOCKEDOUTBECAUSEPREVIOUSSOLUTIONLOCKEDITOUTRELAY.RELAY_1.PHASETRIP=200PHASEINST=400!RAISETHETRIPLEVELSOITONLYTRIPSONFAULTS// SOLVE 1.5 DAYSSOLVEMODE=DAILYSTEPSIZE=1hNUMBER=36CONTROLMODE=STATIC// APPLY FAULT AND SOLVE 1/2 DAYFAULT.F1.ENABLED=YSOLVENUMBER=1FAULT.F1.ENABLE=NO!REPAIRTHEFAULTRELAY.RELAY_1.ACTION=CLOSE!RECLOSETHEBREAKERSOLVENUMBER=11SHOWMONMON_1SHOWEVENTLOG/*set mode=dutyset stepsize=1hset number=25set controlmode=staticset time=(0, 0)*/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
Hi,
Well there are several problems:
// 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
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
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
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
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.
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
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.
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.
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.