NILOY BARUA - 2024-08-28

Hello,

I have considered battery in BUS=204 and PV in place of generator (from the attached circuit). Here, Battery is initially charging and in GFM mode and PV is in GFL mode (by default). I have written the below code and attached are the outcome.
My queries are-
a) The Battery was initially in charging condition (in code) but here its zero (outcome) and after breaker reclosing the breaker starts supplying. Which is not following GFM mode.
b) The PV initially provides power and after Breaker closing it never supply. Unable to understand why.

Code -
// Define daily load shape
New LoadShape.MyLoadShape npts=24 interval=1 mult=(1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0)

// Define a simple load shape for the PV system
New Loadshape.PVShape npts=24 interval=1 mult=(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

// Link the load shape to the PV system
Edit PVSystem.SolarPV daily=PVShape

// Define Battery
New "Storage.Battery" phases=3 conn=delta bus1=204 kV=13.8 kva=500 kWrated=500 kWhrated=2000 %stored=50 %reserve=20 // 204 BUS
~ %EffCharge=80 %EffDischarge=80 %IdlingkW=1 %R=50 %X=50 State=Charging kP=0.3 KVDC=0.700 PITol=0.1

// Define Solar panel
New "PVSystem.SolarPV" phases=3 conn=delta bus1=LDG kV=13.8 kva=500 pmpp=500 daily=pvshape %R=50 %X=50 kP=0.1 KVDC=0.700 PITol=0.1

! Grid forming inverter mode requires an InvControl for monitoring the current
New InvControl.StoCtrl DERList=[Storage.Battery] mode=GFM !eventlog=yes

New Monitor.Feederpower element=Line.Line1 terminal=1 mode=1 ppolar=no
New Monitor.SolarPQ Element=PVSystem.SolarPV Terminal=1 Mode=1 ppolar=no
New Monitor.BATTPQ Element=Storage.Battery Terminal=1 Mode=1 ppolar=no
New Monitor.101PQ Element=Line.Line5 Terminal=1 Mode=1 ppolar=no
New Monitor.105PQ Element=Line.Line6 Terminal=1 Mode=1 ppolar=no

set voltagebases = [13.8 4.16 .48 0.208]
calcvoltagebases

BusCoords CSVFile="E:\Course details\Spring 2024\OpenDSS\Banshee One feeder\BusCoords Banshee_BusXY.csv"

Solve
!Dynamic mode
Solve mode=dynamic number=200 stepsize=0.001
! Creating Islanding mode by opening SWFeeder (main breaker)
open Line.SWFeeder terminal=1
solve number=1000

edit Storage.Battery State=Discharging ControlMode=GFM SafeVoltage=0

close Line.SWFeeder terminal=1
solve number=5000