OpenDSS Training
Workshop
PVSystem, InvControl, Storage,
StorageController – Parts I and III
Celso Rocha, Paulo Radatz
EPRI Knoxville, TN
August 26, 2020
www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Instructor
▪ Celso Rocha, Member, IEEE
Celso Rocha serves as Engineer Scientist II at the Electric Power Research Institute (EPRI) in
Knoxville, Tennessee USA. He received his degree in electrical engineering with emphasis in energy
and automation from University of Sao Paulo, Sao Paulo, Brazil (2017); Currently, he is pursuing his
Masters in electrical engineering at University of Sao Paulo, Sao Paulo, Brazil under the supervision
of Dr. Nelson Kagan. He has 5 years of experience with OpenDSS, having taught several OpenDSS
trainings in Brazil at conferences, universities and industry.
▪ Paulo Radatz
Paulo Radatz serves as Engineer Scientist II at the Electric Power Research Institute (EPRI) in
Knoxville, Tennessee USA. He received both his Masters and Bachelors degree in electrical
engineering with emphasis in energy and automation from University of Sao Paulo, Sao Paulo,
Brazil. He was awarded a prize for being the best bachelor's student of Polytechnic School of
University of Sao Paulo (2015). He has 5 years of experience with OpenDSS, having taught several
OpenDSS trainings in Brazil at conferences, universities and industry.
2 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
1. Inverter Modeling in OpenDSS
3 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
“New inverter.*”?
▪ No standalone inverter component
▪ Features span over PVSystem, Storage and InvControl
– At PVSystem and Storage:
▪ Nameplate, settings and losses: kVA, kvarMax, …
▪ Basic functions: Constant PF, constant kvar, …
– At InvControl:
▪ More complex functionalities (Volt-Var, DRC, Volt-Watt, …)
4 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Inverter Capability Curve
Storage (Ch)
PVSystem
and Storage
(Dch)
5 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Inverter Capability Curve
▪ Customization: set the respective parameter to “0” to disable it
6 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Inverter Capability Curve
▪ Violation of capability curve: application of priorities
– wattPriority [True/False*]
– pfPriority [True/False*]
Reactive Power Priority
Power Factor Priority
Active Power Priority
7 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
2. PVSystem + InvControl
8 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
PVSystem Element in OpenDSS
▪ The PVSystem model combines the photovoltaic (PV) array and
the PV inverter into one convenient model to use for distribution
system impacts studies
9 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
PVSystem Properties
PV Array
Pmpp
P-TCurve
PV Inverter
Inverter Connection and Efficiency Curve
kV, Phases, bus1, conn, EffCurve
Inverter Capability Curve
%cutin, %cutout, kvarMax, kvarMaxAbs, WattPriority,
PFPriority, %PminNoVars, %PminkvarMax Operating Conditions
Inverter Functions SnapShot
%Pmpp, PF, kvar, VarFollowInverter Irradiance, Temperature
QSTS
Irradiance,
irradiance curve (daily, yearly, or duty),
temperature curve (Tdaily, Tyearly, or Tduty)
10 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Example Script
Clear
New Circuit.TheveninEquivalent bus1=A pu=1.0 basekv=13.8
New XYCurve.Eff npts=4 xarray=[.1 .2 .4 1.0] yarray=[.86 .9 .93 .97]
New XYCurve.FatorPvsT npts=4 xarray=[0 25 75 100] yarray=[1.2 1.0 0.8 0.6]
New Loadshape.Irrad npts=24 interval=1
~ mult=[0 0 0 0 0 0 .1 .2 .3 .5 .8 .9 1.0 1.0 .99 .9 .7 .4 .1 0 0 0 0 0]
New Tshape.Temp npts=24 interval=1
~ temp=[25 25 25 25 25 25 25 25 35 40 45 50 60 60 55 40 35 30 25 25 25 25 25 25]
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1200 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp pf=0.9
Set voltagebases=[13.8]
Calcvoltagebases
Set mode=daily
Solve
11 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Base Case
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1200 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp pf=0.9 %cutin=20 %cutout=20
Pdc < %cutin * kVA Pdc < %cutout * kVA
12 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Base Case
New Monitor.PV_v element=PVSystem.PV terminal=1 mode=3
13 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
kVA exceeded under P priority
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1000 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp wattpriority=yes pf=0.8
Inverter kVA rating reached
Reactive power reduced
14 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
kVA exceeded under Q priority
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1000 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp wattpriority=no pf=0.8
Active power reduced
15 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Active Power Limited – Limit DER Power
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1000 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=60 daily=Irrad Tdaily=Temp pf=1
Active power limited to %Pmpp x Pmpp
Curtailment
16 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Reactive Power Limited
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1000 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp pf=0.6 kvarmax=300
Reactive power limited to kvarMax
17 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Night Operation
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1000 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp kvar=300 varfollowinverter=no
Reactive power at night
18 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
InvControl Element in OpenDSS
▪ Works in conjunction with PVSystem/Storage object(s) to control
the DERs output according to advanced (‘smart’) inverter
functions
19 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
InvControl Properties
Common Properties
Mode and element controlled
REQUEST Reactive Power
DERList, mode, Combimode
RefReactivePower
Convergence Volt-var
VoltageChangeTolerance, VarChangeTolerance, ActivePChangeTolerance Vvc_curve1
deltaQ_factor, deltaP_factor (Set equal to -1 allows automatic algorithm) DRC (Dynamic Reactive Current)
Monitored Voltage DbvMin, DbvMax, ArGraLowV,
ArGraHiV, DynReacavgwindowlen
monBus, monBusesVbase, monVoltageCalc, voltage_curvex_ref
Watt-pf
Wattpf_curve
Watt-var
LIMIT Active Power Wattvar_curve
Volt-watt
VoltwattYAxis
Voltwatt_curve
VoltwattCH_curve (Storage Only)
20 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Smart Inverter Functions
▪ Volt-Var
– Follows a voltage versus reactive power curve and REQUESTS the
reactive power generation (capacitive) or reactive power absorption
(inductive) according to the monitored voltage of each DER element
21 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Smart Inverter Functions
▪ Volt-Watt
– Follows a voltage versus active power curve and defines the active power
output LIMIT according to the monitored voltage of each DER element
Allowed
Operating
Area
22 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Smart Inverter Functions
▪ Watt-PF
– Follows an active power versus power factor curve to REQUEST the
reactive power according to the active power output of each DER
element
▪ Watt-Var
– Follows an active power versus reactive power curve and REQUESTS the
reactive power according to the active power output of each DER
element
23 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Smart Inverter Functions
▪ Dynamic Reactive Current (DRC)
– Has several settings that REQUEST the reactive power generation or
absorption in response to fast changes in monitored voltage (e.g., during
a sag or swell)
▪ Volt-Var + Volt-Watt
▪ Volt-Var + DRC
▪ Volt-Watt + DRC
▪ Volt-Watt + PF or var constant
– Volt-Watt set in InvControl and PF or var constant set in
PVSystem/Storage
24 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Volt-Var Example
New PVSystem.PV phases=3 bus1=A Pmpp=1000 kV=13.8 kVA=1010 effcurve=Eff
~ P-TCurve=FatorPvsT %Pmpp=100 daily=Irrad Tdaily=Temp wattpriority=yes
New XYcurve.generic npts=5 yarray=[1 1 0 -1 -1] xarray=[0.5 0.92 1.0 1.08 1.5]
New InvControl.VoltVar mode=VOLTVAR vvc_curve1=generic RefReactivePower=VARMAX
25 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Monitor mode 3 – State Variables
New Monitor.PV_v element=PVSystem.PV terminal=1 mode=3
Function Flags
hour IrradiancePanelkW P_TFactor Efficiency Vreg Vavg (DRC) volt-var volt-watt DRC VV_DRC
1 0 0 1 1 0.99 9999 0 9999 9999 9999
2 0 0 1 1 0.99 9999 0 9999 9999 9999
3 0 0 1 1 0.99 9999 0 9999 9999 9999
4 0 0 1 1 0.99 9999 0 9999 9999 9999
5 0 0 1 1 0.99 9999 0 9999 9999 9999
6 0 0 1 1 0.99 9999 0 9999 9999 9999 Regulated Voltage
7 0.1 100 1 1 0.99 9999 0 9999 9999 9999 used in the Smart
8 0.2 200 1 1 0.99 9999 0 9999 9999 9999 Inverter Functions
9 0.3 300 1 1 1.00 9999 -1 9999 9999 9999
10 0.5 500 1 1 1.01 9999 -1 9999 9999 9999
REQUEST Reactive Power
Volt-var, DRC, Watt-pf, Watt-var, and VV_DRC Flags
LIMIT Active Power
Negative value for var absorption
Positive value for var generation Volt-watt Flag
1 indicates the function operates without restriction 1 indicates active power limited
0.6 indicates inverter kVA rating exceed under P priority 0 otherwise
0.2 indicates reactive power limited by
kvarMax/kvarMaxAbs
0 indicates no reactive power requested
9999 indicates not applied
26 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Volt-Var Example
New PVSystem.PV phases=3 Pmpp=1000 kV=13.8 kVA=1010 wattpriority=yes …
New XYcurve.generic npts=5 yarray=[1 1 0 -1 -1] xarray=[0.5 0.92 1.0 1.08 1.5]
New InvControl.VoltVar mode=VOLTVAR vvc_curve1=generic RefReactivePower=VARMAX
Voltage Reduced with Volt-var
Reactive power reduced Inverter kVA rating reached
27 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Volt-Watt Example
New XYcurve.generic npts=3 yarray=[1 1 0] xarray=[1 1.02 1.1]
New InvControl.VoltWatt mode=VOLTWATT voltwatt_curve=generic VoltwattYAxis=PMPPPU
Active Power Limited
28 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
3. Storage + StorageController
29 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Element in OpenDSS
▪ General purpose energy storage
▪ In snapshot mode, same effect as a load/generator
▪ The strength is in time-varying (QSTS) simulation modes
– Storage is a variable resource, but it is also limited
– Account for energy stored, and losses
30 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Modeling
“Same” as in PV System
31 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Modeling
32 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Operation – Power Flow within Storage
▪ In Charging state: Power that effectively charges the ES
𝐼𝑑𝑙𝑖𝑛𝑔 𝑐ℎ
𝐼𝑛𝑣
𝑃𝐿𝑜𝑠𝑠𝑒𝑠 𝑃𝐿𝑜𝑠𝑠𝑒𝑠 𝑃𝐿𝑜𝑠𝑠𝑒𝑠
Power that effectively charges the ES
𝑃𝑖𝑛
𝑒𝑓𝑓
𝑃𝑖𝑛
33 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Operation – Power Flow within Storage
▪ In Discharging state: Power that effectively discharges the ES
𝐼𝑛𝑣 𝐼𝑑𝑙𝑖𝑛𝑔 𝑑𝑐ℎ
𝑃𝐿𝑜𝑠𝑠𝑒𝑠 𝑃𝐿𝑜𝑠𝑠𝑒𝑠 𝑃𝐿𝑜𝑠𝑠𝑒𝑠
𝑒𝑓𝑓
𝑃𝑜𝑢𝑡
𝑃𝑜𝑢𝑡
34 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Operation – Power Flow within Storage
▪ In Idling state:
𝐼𝑛𝑣 𝐼𝑑𝑙𝑖𝑛𝑔
𝑃𝐿𝑜𝑠𝑠𝑒𝑠 𝑃𝐿𝑜𝑠𝑠𝑒𝑠
𝑃𝑖𝑛
35 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Dispatch Modes
Measure Means Modes
▪ Someone needs to tell
Default
the element when Follow
charge/discharge and at Self- LoadLevel
Dispatch
what rate Price
External
▪ “Self-dispatch”: TimeChargeTrigger (Charge Only)
– Active power → dispmode Active Power PeakShave/I-PeakShave (Discharge Only)
Follow (Discharge Only)
– Reactive Power → pf, kvar Support (Discharge Only)
Storage
▪ Any combination of Controller
Schedule (Discharge Only)
PeakShaveLow/I-PeakShaveLow (Charge Only)
Active Power and Loadshape
Reactive Power control is Time
valid! Self- Constant PF
Dispatch Constant kvar
Reactive
Volt-Var
Power
InvControl Dynamic Reactive Current (DRC)
Volt-Var + DRC
36 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Dispatch Modes – Self-Dispatch (Follow)
New LoadShape.dispatch_shape interval=1
npts=24 mult = [0, -1.0, -1.0, -1.0, -0.5, -0.5, 0, 0, 0, %reserve
0, 0, 0, 0 , 0, 0.5, 0.75, 1.0, 1.0, 1.0, 1.0, 0.75, 0.5, 0,
0]
New Storage.Storage1 phases=3 bus1=A kv=0.48
~ kWrated=50 %reserve=20
~ kWhrated= 500 %stored=50
~ dispmode=follow daily=dispatch_shape
𝑷 𝒕 = 𝒎𝒖𝒍𝒕 𝒕 ∗ 𝒌𝑾𝑹𝒂𝒕𝒆𝒅
37 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Dispatch Modes – Self-Dispatch (External)
// 1am-2am
Set number=2
Solve
// 3am-7am
Edit Storage.Storage1 state=charging
New Storage.Storage1 phases=3 bus1=A kv=0.48 kWrated=50 %reserve=20
~ %charge=80 kWhrated= 500 %stored=50 state=idling dispmode=External
Set number=5
Solve
// 8am-5pm
Edit Storage.Storage1 state=idling
Set number= 10
Solve
// 6am-10pm
Edit Storage.Storage1 kW=25
Set number=5
Solve Implicitly sets state to discharge (>0)
// 11pm-12am
Edit Storage.Storage1 state=idling
Set number= 2
Solve
38 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller Element in OpenDSS
▪ Control Element
▪ Designed to control a fleet of ES
▪ Monitors a terminal of a current-carrying element (typically a PDE)
Fleet of Distributed Energy Storage Elements
39 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller - Dispatch Modes
Requested State Modes
Peakshave
I-Peakshave
Discharging Follow
Support
Schedule
PeakShaveLow
Charging
I-PeakShaveLow
Time
Discharging and
Charging Loadshape
40 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller - Dispatch Modes
▪ Examples – Base Circuit (IEEE 8500 Buses)
Substation Fleet Energy Capacity= 7.35 MWh
Fleet Power Capacity= 1.55 MW
New Storage.A phases=3 bus1=l3235258 kv=12.47 kWhrated=500.0 kWrated=100.0 %stored=70
New Storage.B phases=3 bus1=m1069483 kv=12.47 kWhrated=1000.0 kWrated=200.0 %stored=70
New Storage.C phases=3 bus1=p862322 kv=12.47 kWhrated=1650.0 kWrated=350.0 %stored=70
New Storage.D phases=3 bus1=m1047615 kv=12.47 kWhrated=1250.0 kWrated=300.0 %stored=70
New Storage.E phases=3 bus1=m1069556 kv=12.47 kWhrated=500.0 kWrated=150.0 %stored=70
New Storage.F phases=3 bus1=l2688692 kv=12.47 kWhrated=1200.0 kWrated=200.0 %stored=70
New Storage.G phases=3 bus1=m1089131 kv=12.47 kWhrated=1250.0 kWrated=250.0 %stored=70
41 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller - Dispatch Modes –
PeakShaving (Discharging) and Time (Charging)
New StorageController.SC element=Line.ln5815900-1 modedis=peakShave kwtarget=10200
~ modecharge=Time timeChargeTrigger=2 %rateCharge=50
42 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller - Dispatch Modes –
PeakShaving (Discharging) and Time (Charging)
New StorageController.SC element=Line.ln5815900-1 modedis=peakShave kwtarget=10200
~ modecharge=Time timeChargeTrigger=2 %rateCharge=50
No Power - Case
set casename=NoPower
Edit Storage.A kWrated=50
Edit Storage.B kWrated=100
Edit Storage.C kWrated=175
Edit Storage.D kWrated=150
Edit Storage.E kWrated=75
Edit Storage.F kWrated=100
Edit Storage.G kWrated=125
Original Fleet Power Capacity= 1.55 MW Fleet Power Capacity= 0.775 MW
43 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller - Dispatch Modes –
PeakShaving (Discharging) and Time (Charging)
New StorageController.SC element=Line.ln5815900-1 modedis=peakShave kwtarget=10200
~ modecharge=Time timeChargeTrigger=2 %rateCharge=50
No Energy - Case
set casename=NoEnergy
Edit Storage.A kWhrated=250
Edit Storage.B kWhrated=500
Edit Storage.C kWhrated=825
Edit Storage.D kWhrated=625
Edit Storage.E kWhrated=250
Edit Storage.F kWhrated=600
Edit Storage.G kWhrated=625
Original Fleet Energy Capacity= 7.35 MWh Fleet Energy Capacity= 3.675 MWh
44 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller + InvControl
A B Storage B C Storage C D Storage D
~
Load B
New Storage.B phases=3 bus1=B kv=13.8 kVA=1000 kWrated=1000 kWhrated= 10000 kvarMax=800
New Storage.C phases=3 bus1=C kv=13.8 kVA=1000 kWrated=1000 kWhrated= 10000 kvarMax=800
New Storage.D phases=3 bus1=D kv=13.8 kVA=1000 kWrated=1000 kWhrated= 10000 kvarMax=800
45 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller + InvControl
Storage
Controller
A B Storage B C Storage C D Storage D
𝑽𝑩 𝑽𝑪
𝑷𝒎𝒆𝒂𝒔
𝑽𝑫
~
Load B InvControl InvControl InvControl
set maxcontroliter=200
Set mode=Daily
! StorageController
!Cases Set stepsize=1h
new Storagecontroller.SC element=line.AB
set casename=NoControls
~ modedis=peakshave kwtarget=4000
Edit StorageController.SC enabled=False Set number=10
Edit InvControl.InvControl enabled=False Solve
! InvControl
New XYcurve.generic npts=5 yarray=[1 1 0 -1 -1]
set casename=Ppriority Edit Vsource.source pu=0.94
~ xarray=[0.5 0.92 1.0 1.08 1.5]
Batchedit Storage..* wattpriority = True set number=4
New InvControl.InvControl mode=VOLTVAR
~ vvc_curve1=generic Solve
set casename=Qpriority
~ RefReactivePower=VARMAX
Batchedit Storage..* wattpriority = False Edit Vsource.source pu=1
set number=10
Solve
46 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller + InvControl
Peak could not be completely
shaved with Q priority!
New Monitor.Mon_StorageD_State element=Storage.D mode=3
47 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Storage Controller + InvControl
▪ Monitor in Mode 3 for Storage D and Q-priority case
Dispatched Power Requested by
Storage Controller
hour kWh kWOut kvarOut Vref kWDesired
11 8185.26 600.086 799.936 0.911377 801.688
Q Priority
P Priority
48 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Where do I go from here?
▪ Detailed technical notes available at your
local OpenDSS installation Doc folder
(C:\Program Files\OpenDSS\Doc)
– Inverter Modeling
▪ DSS Scripts at “Examples/InverterTechNote/”
– PVSystem and InvControl Element Models
▪ DSS Scripts at “Examples/InverterModels/”
– Storage Element
▪ DSS Scripts at “Examples/StorageTechNote/”
– StorageController Element
▪ DSS Scripts at
“Examples/StorageControllerTechNote/”
▪ Official Forum at SourceForge
49 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.
Together…Shaping the Future of Electricity
50 www.epri.com © 2019 Electric Power Research Institute, Inc. All rights reserved.