Documente Academic
Documente Profesional
Documente Cultură
1600
1400
1200
1000
800
600
MWh
OpenDSS
Introductory Training
Level 1
400
200
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
22
19
16
Hour
13
10
Month
28 APR 2009
Roger Dugan
rdugan@epri.com
Introduction
Why DSS?
DSS was developed to provide a very flexible research
platform and a foundation for special distribution analysis
applications such as DG analysis
Fills gaps left by other distribution system analysis tools.
These do very well in traditional distribution system
analysis meeting the needs of their respective user
bases
Integration of user interface, GIS and other databases
quite important, but results in slower implementation of
innovative modeling to meet new challenges
DSS Background
Under development for more than 10 Years
Started at Electrotek Concepts in 1997
Purchased by EPRI in 2004
Objectives in 1997
Tool to support all distribution planning aspects of
distributed generation
Implement a flexible research platform
Incorporate object-oriented data ideas
Key Future work
Platform for DSE for North American Systems
Research platform for reliability tools
2009 Electric Power Research Institute, Inc. All rights reserved.
Inf. Bus
(Voltage, Angle)
Power Delivery
System
Comm
Msg Queue 1
Power Conversion
Element
("Black Box")
Control
Center
Comm
Msg Queue 2
Control
Examples of Analysis
Performed by DSS
Annual Losses
Peak load losses are not necessarily indicative of annual
losses
Year 5 Losses: total 2413 MWh
70
25000
60
20000
50
kWh
40
10000
30
5000
Load, MW
15000
10
Oct
Jul
Apr
Jan
21
10
17
Hour
13
20
Month
Solar PV Simulation
5
5
Without PV
With PV
-1
-1
2 Weeks
11
Difference, MW
MW
Difference
1600
1400
1200
7000
14
1000
5000
MWh EEN
600
400
200
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
22
19
16
Hour
13
10
Month
Base Hourly Incremental EEN
10
4000
3000
2000
1000
0
150
6000
12
Base_Case
2MW_CHP
Incr. Cap.
MWh
160
170
180
190
200
Incr. Cap., MW
6000
800
0
210
MW Load
5000
4000
5000-6000
4000-5000
KW 3000
3000-4000
2000-3000
1000-2000
0-1000
2000
1000
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S12
1 2
3 4
5 6
7 8
9 10
11 12
13 14
Hour
15 16
17 18
19 20
21 22
23 24
Month
12
DG Dispatch
Phase 1b Required DR Output
5000
2500
4500
2000
4000
1500
3500
1000
3000
500
2500
2000
-500
kW
Hour
13
8609
8340
8071
7802
7533
7264
6995
6726
6457
6188
5919
5650
5381
5112
4843
4574
4305
4036
3767
3498
3229
2960
2691
2422
2153
1884
-2500
1615
1346
-2000
808
500
1077
-1500
539
1000
-1000
270
1500
Power, kW
kvar
DG Impact Visualization
14
15
Optimal DG Siting
16
Losses, kW
250
200
No-Load Losses
150
100
50
Load Losses
0
0
50
100
150
350
Hour (1 Week)
Total Losses
300
250
Losses, kW
200
150
100
Load Losses
50
No-Load Losses
0
5200
5250
5300
Hour (1 Week)
17
5350
0.025
0.02
|Y|
0.015
0.01
0.005
0
0
100000
200000
300000
Frequency, Hz
2009 Electric Power Research Institute, Inc. All rights reserved.
18
400000
500000
Current
19
Power
20
21
Installation
23
24
25
26
27
Program Files
OpenDSS.EXE
OpenDSSEngine.DLL
KLUSolve.DLL
DSSgraph.DLL
Standalone EXE
In-process COM server
Sparse matrix solver
DSS graphics output
28
In VBA:
Public DSSobj As OpenDSSEngine.DSS
Set DSSobj = New OpenDSSEngine.DSS
29
30
31
DSS Structure
Scripts
COM
Interface
Scripts,
Results
32
UserWritten
DLLs
Options
Circuit
Solution
PDElement
Line
Transformer
Capacitor
Reactor
PCElement
Load
Generator
Vsource
Isource
Controls
RegControl
CapControl
Relay
Reclose
Fuse
33
[Y]
Meters
General
Monitor
EnergyMeter
Sensor
LineCode
LineGeometry
WireData
LoadShape
GrowthShape
Spectrum
TCCcurve
Object 1
Property Definitions
Property Values
Methods
Yprim
States
Collection Manager
Object n
Property Values
Methods
Yprim
States
2009 Electric Power Research Institute, Inc. All rights reserved.
34
DSS Classes
Power Delivery (PD) Elements
Line
Transformer
Reactor
Capacitor
Power Conversion (PC) Elements
Load
Generator
Vsource
Isource
Control Elements
RegControl
CapControl
Recloser
Relay
Fuse
Metering Elements
Monitor
EnergyMeter
Sensor
General
LineCode
LineGeometry
Loadshape
Growthshape
Wiredata
Spectrum
TCC Curves
35
Circuit Principles
0 1
2 3
37
1
Power Delivery
or Power Conversion
Element
38
Terminal 1
Power Delivery
Element
39
Terminal 2
F
V
Power Conversion
Element
40
BusX
Terminal 1
Power Delivery
Element
Terminal 2
Terminal 1
Power Delivery
Element
2
Iterm = [Yprim] Vterm
0
. . . Bus1 = BusX . . .
. . . Bus2 = BusX.2.1.3.0 . . .
DSS Convention: A Terminal can be connected to only one Bus. You can have any
number of Nodes at a bus.
2009 Electric Power Research Institute, Inc. All rights reserved.
41
Terminal 2
New
Transformer.Example1-ph
~ Xhl=2.04
Xht=2.04
~ Buses=[bus1.1
~ kVs=[7.2 .12
phases=1
Xlt=1.36
bus2.1.0
.12]
Windings=3
%noloadloss=.2
bus2.0.2]
! ratings of windings
~ kVAs=[25 25 25]
~ %Rs = [0.6
1.2
Bus 1
1.2]
! default
Bus 2
1
Wdg 2
Wdg 1
0
Wdg 3
0 or
2
42
3-Phase
Transformer
3 PHASES
2 WINDINGS
4 CONDS/TERMINAL*
2
2
3
3
(OPEN)
* MUST HAVE THE SAME NUMBER OF
CONDUCTORS FOR EACH TERMINAL
2009 Electric Power Research Institute, Inc. All rights reserved.
43
Load (a PC Element)
Compensation
Current
Yprim
(One-Line Diagram)
44
Phase 1
Yprim
Compensation
Current
Yprim
Compensation
Current
Phase 2
4 Conductors/Terminal
Yprim
Compensation
Current
Phase 3
4
2009 Electric Power Research Institute, Inc. All rights reserved.
45
Phase 1
Yprim
Compensation
Current
Yprim
Compensation
Current
Phase 2
Yprim
Compensation
Current
Phase 3
3 Conductors/Terminal
46
Yprim 2
Yprim 3
Yprim n
PC Elements
I1
I2
Iinj
Im
Iteration Loop
47
Node
Voltages
Solution Speed
Distribution systems generally converge quite rapidly with
this method.
The OpenDSS program seems to be on par with the
faster commercial programs or faster
It is set up to run annual simulations easily
Our recommendation:
Err on the side of running more power flow
simulations
That is, dont worry about the solution time until it
proves to be a problem
That reveals more information about the problem.
2009 Electric Power Research Institute, Inc. All rights reserved.
48
Scripting Basics
A Basic Script
TR1
LINE1
1 Mile, 336
ACSR
Source
Sourcebus
115 kV
Sub_bus
Loadbus
12.47 kV
LOAD1
1000 kW
0.95 PF
New Circuit.Simple
(Vsource.Source)
ISC3=3000
ISC1=2500
Show Currents
Show Powers kVA elements
2009 Electric Power Research Institute, Inc. All rights reserved.
50
Command Syntax
Command parm1, parm2 parm3 parm 4 .
Parameters may be positional or named (tagged).
If named, an "=" sign is expected.
Name=value (this is the named form)
Value (value alone in positional form)
For example, the following two commands are equivalent:
51
LineCode=336ACSR,
Delimiters
Array or string delimiter pairs:
[ ] , { },( ), ,
Matrix row delimiter:
|
Value delimiters:
, (comma)
any white space (tab or space)
Class, Object, Bus, or Node delimiter: . (period)
Keyword / value separator:
=
Continuation of previous line:
~ (More)
Comment line:
//
In-line comment:
!
Query a property:
?
52
Matrix
(3x3 matrix)
Xmatrix=[1.2 .3 .3 | .3 1.2 3 | .3 .3 1.2]
(3x3 matrix lower triangle)
Xmatrix=[ 1.2 | .3 1.2 | .3 .3 1.2 ]
53
54
Run_The_Master.DSS
Master.DSS
LineCodes.DSS
WireData.DSS
LineGeometry.DSS
Libraries
Spectrum.DSS
LoadShape.DSS
Transformers.DSS
Lines.DSS
Make a separate folder for
each circuit
Loads.DSS
Etc.
55
Circuit
Definition
Solution Modes
57
Short Circuit
Faultstudy
MF - Monte Carlo Fault
58
Snapshot Mode
This is the DEFAULT MODE
Does one power flow solution at the present load level
Controlmode is set to static
All Control devices execute in sequence of their time
delays shortest first
Next control action may then be cancelled
You can change the default control mode if driving the
DSS externally
You have to explicitly tell monitoring devices to
sample
Watch the SUMMARY window for lack of convergence
60
61
CalcVoltageBases
This command was implemented to avoid having to specify
base voltages for each bus
You can do that by Setkvbase bus= kvln|kvll =
Solves a ZERO LOAD SNAPSHOT power flow
Set voltage bases = closest value in the set defined by
Set Voltagebases=[115
12.47
0.48 ]
Note: this will not always work if you have two voltage bases
really close together such as 12.0 and 12.47
Remember: The DSS works in Volts, Amps, and Ohms
Voltage bases are provided for convenience
62
63
Daily
Does 24 hour solution following load shape defined as Daily
See Load definition
There is a default loadshape defined called default
Note: the LOAD model default is NONE
You may change the default values
To use a 15-min load shape,
Set NUMBER=96 and stepsize=(3600 4 /) 900 s
Meters and Monitors are reset when entering mode
Are not reset until mode is changed
Automatically sampled at end of each power flow solution
Static control mode
Be careful specifying time delays! If all the same, they will all try to
operate at once!
2009 Electric Power Research Institute, Inc. All rights reserved.
65
66
Yearly
Similar to Daily
Defaults to
1 hr stepsize (3600 s)
Number = 8760
Adjusts load for growth (Set Year = )
Load uses loadshape defined for Yearly=
Defaults to Daily repeats over and over
If Daily is NONE, then load is constant
Note: Energymeters stay open; (Monitors are saved)
Have to be explicitly closed by Reset or Set Year=
67
1600
1400
1200
7000
14
1000
5000
MWh EEN
600
400
200
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
22
19
16
Hour
13
10
Month
Base Hourly Incremental EEN
10
4000
3000
2000
1000
0
150
6000
12
Base_Case
2MW_CHP
Incr. Cap.
MWh
160
170
180
190
200
Incr. Cap., MW
6000
800
0
210
MW Load
5000
4000
5000-6000
4000-5000
KW 3000
3000-4000
2000-3000
1000-2000
0-1000
2000
1000
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S12
1 2
3 4
5 6
7 8
9 10
11 12
13 14
Hour
15 16
17 18
19 20
21 22
23 24
Month
68
Reg 1 = kWh
Reg 2 = kvarh
Reg 3 = Max kW
Reg 4 = Max kVA
Reg 5 = Zone kWh
Reg 6 = Zone kvarh
Reg 7 = Zone Max kW
Reg 8 = Zone Max kVA
Reg 9 = Overload kWh Normal
Reg 10 = Overload kWh Emerg
Reg 11 = Load EEN
Reg 12 = Load UE
Reg 13 = Zone Losses kWh
Reg 14 = Zone Losses kvarh
Reg 15 = Zone Max kW Losses
Reg 16 = Zone Max kvar Losses
Reg 17 = Load Losses kWh
Reg 18 = Load Losses kvarh
Reg 19 = No Load Losses kWh
2009 Electric Power Research Institute, Inc. All rights reserved.
69
Dutycycle
Meant to study
Rock crushers
Wind turbines
Rolling mills and other cyclic large motor loads
Loads follow shape defined by Duty property
Monitors are sampled & saved
Energymeters are NOT sampled during the loop
70
(W )
4000
P 3 -(k W )
3000
2000
Q 3 -(k v a r)
(V A r)
1000
0
-9 1
-1 9 1
-2 9 1
1.0 3
-3 9 1
1.0 2
-4 9 1
1.0 1
-5 9 1
1.0 0
20000
40000
T i m e (s )
E l e c tro te k C o n c e p ts
60000
80000
0.9 9
T O P , T h e O u tp u t P ro c e s s o r
0.9 8
(V )
0.9 7
Ta p -(p u )
1.0 2
1.0 0
0.9 8
0.9 6
0
20000
E lectrotek C on cepts
71
40 000
T ime (s)
60000
800 00
T O P , T he O utp ut P roces sor
73
FaultStudy Mode
Algorithm
Disable all FAULT objects defined in the circuit
Sets Loadmodel=Admittance
Does DIRECT solution
Generators included (Thevenin equivalent)
Save Open-circuit voltages, Voc
Computes Ysc matrix at each bus
Computes Isc by applying
Isc = Ysc*Voc
Answer could differ slightly from specific fault solution
Show Fault to see answers
2009 Electric Power Research Institute, Inc. All rights reserved.
74
75
DSS Interface
77
End Sub
78
End Sub
79
COM Interface
80
Result Property
The Result property is a Read Only property that contains
any result messages the most recent command may have
issued.
Error messages
Requested values
Example: Query line length
DSSText.Command = ? Line.L1.Length
S = DSSText.Result
MsgBox S
81
%
%instantiate the DSS Object
Obj = actxserver('OpenDSSEngine.DSS');
%
%Start the DSS.
%Matlab session
Start = Obj.Start(0);
82
83
% list.
ParamNum = 6;
OutputData(Case_Count,1) = Case_Count;
% Generate random new coordinates for each conductor
[x1 y1 x2 y2 x3 y3 geomean] = RandomGeometry(8,0.75,30);
(... etc. etc. )
84
Questions?