You are on page 1of 44

Electrical and Computer

Engineering Department

Introduction to OpenDSS

Dr. Abdalkarim Awad

(Smart Grid) Modelling Challenges


Low Carbon Technologies (Distributed Energy
Resources)
Generation, Storage, Demand Response

Communications and control


Typically not represented in distribution network analysis

Monitoring
Protection
Energy Efficiency

Dr.- Ing. Abdalkarim Awad

What is OpenDSS
The OpenDSS is an electric power Distribution
System Simulator (DSS) for supporting distributed
resource integration and grid modernization efforts.
Script driven, frequency domain electrical circuit
simulation tool
Limited graphical user interface
Extremely flexible

Specific models for:


Supporting utility distribution networks analysis
Unbalanced, multi-phase power distribution networks
North American and European style networks

Dr.- Ing. Abdalkarim Awad

What can OpenDSS be used for?


Simple power flow (unbalanced, n-phase)
Daily loading simulations
Yearly loading simulations
Duty cycle simulations
Impulse loads
Renewable generation
DG
Interconnection studies/screening
Value of service studies (risk based)
Solar PV voltage rise/fluctuation
Wind power variations impact
Hi-penetration solar PV impacts
Harmonic distortion
Dynamics/islanding

Hour

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

1615

1346

1077

808

539

270

Power, kW
5000
2500

4500
2000

4000

3500
1000

3000
500

2500
0

2000
kW
-500

1500
-1000

1000
-1500

500
-2000

0
-2500

Reactive Power, kvar

DG Dispatch
Phase 1b Required DR Output

kvar
1500

Solar PV Simulation

5
Without PV

With PV

-1

-1
2 Weeks

Difference, MW

MW

Difference

Wind Plant 1-s Simulation

A c tiv e a n d R e a c ti v e P o w e r

Feeder Voltage and Regulator Tap Changes

1.03

(W )

4000

1.02

P 3 -(k W )

3000
1.01

2000

1.00
0.99

1000
0

0.97

(V )

(V A r)

0.98

-91

Q 3 -(k v a r)

Ta p -(p u )

1.02

-191
-291
-391

1.00

0.98

-491
0.96

-591
0
E le c tr o te k C o n c e p ts

20000

40000
T im e ( s )

60000

80000

T O P , T h e O u tp u t P r o c e s s o r Electrotek Concepts

20000

40000
Time (s)

60000

80000
TOP, The Output Processor

Example

First solve
basic circuit
400000 V
I
4000 Amps
1000
V 400000 (5 j 40) 4000
42000 j16000 44.920.8 kV
S V I * 44.9k20.8 4000
17.9820.8 MVA 16.8 j 6.4 MVA
Dr.- Ing. Abdalkarim Awad

Example

First solve
basic circuit
Power Consumed
in the load?
400000 V
I
4000 Amps
1000
Loss?
V 400000 (5 j 40) 4000
42000 j16000 44.920.8 kV
S V I * 44.9k20.8 4000
17.9820.8 MVA 16.8 j 6.4 MVA
Dr.- Ing. Abdalkarim Awad

10

Simulation (Example 3_0.dss)


clear
New Circuit.Example3_0 ! Creates voltage source (Vsource.Source)
set Basefrequency=50
Edit Vsource.Source Bus=SourceBus BasekV=40 pu=1.137 freq=50
~ ISC1=2500 Angle=0 !Define source V and Z
New Linecode.Code1 R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus Linecode=Code1
~ Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=1.0
LoadBus
Set voltagebases="40"
Line1
Calcv
Solve
Source
SourceBus
Show Powers
Load1

Dr.- Ing. Abdalkarim Awad

11

Simulation
clear
New Circuit.Example3_0 ! Creates voltage source (Vsource.Source)
set Basefrequency=50
Edit Vsource.Source Bus=SourceBus BasekV=40 pu=1.137 freq=50
~ ISC1=2500 Angle=0 !Define source V and Z
New Linecode.Code1 R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus Linecode=Code1
~ Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=1.0
LoadBus
Set voltagebases="40"
Line1
Calcv
Solve
Source
SourceBus
Show Powers
Load1

Dr.- Ing. Abdalkarim Awad

12

Simulation
clear
New Circuit.Example3_0
! Creates voltage source (Vsource.Source)
set Basefrequency=50
Edit Vsource.Source Bus=SourceBus BasekV=40 pu=1.137 freq=50
~ ISC1=2500 Angle=0 !Define source V and Z
New Linecode.Code1 R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus Linecode=Code1
~ Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=1.0
LoadBus
Set voltagebases="40"
Line1
Calcv
Solve
Source
SourceBus
Show Powers
Load1

Dr.- Ing. Abdalkarim Awad

13

Simulation
clear
New Circuit.Example3_0
! Creates voltage source (Vsource.Source)
set Basefrequency=50
Edit Vsource.Source Bus=SourceBus BasekV=40 pu=1.137 freq=50
~ ISC1=2500 Angle=0 !Define source V and Z
New Linecode.Code1 R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus Linecode=Code1
~ Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=1.0
LoadBus
Set voltagebases="40"
Line1
Calcv
Solve
Source
SourceBus
Show Powers
Load1

Dr.- Ing. Abdalkarim Awad

14

Dr.- Ing. Abdalkarim Awad

15

Example, contd

Now add additional


reactive power load
and resolve

Z Load 70.7

pf 0.7 lagging

I 564 45 Amps
V 59.713.6 kV
S 33.758.6 MVA 17.6 j 28.8 MVA
Dr.- Ing. Abdalkarim Awad

16

Example, contd

Now add additional


reactive power load
and resolve

Power Consumed
in the load?
Z Load 70.7 pf 0.7 lagging
Loss?
I 564 45 Amps

V 59.713.6 kV
S 33.758.6 MVA 17.6 j 28.8 MVA
Dr.- Ing. Abdalkarim Awad

17

Power System Notation

Power system components are usually shown as


one-line diagrams. Previous circuit redrawn
17.6 MW

16.0 MW

28.8 MVR

-16.0 MVR

PowerWorld
simulator
17.6 MW
28.8 MVR

59.7 kV

40.0 kV

16.0 MW
16.0 MVR

Generators are Transmission lines


shown as circles are shown as a
single line
Dr.- Ing. Abdalkarim Awad

Bus

Arrows are
used to
show loads
18

Simulation-Script
clear
New Circuit.Example3_0 ! Creates voltage source (Vsource.Source)
Edit Vsource.Source BasekV=40 pu=1.513 frequency=50
ISC1=2500 Angle=0 !Define source V and Z
New Linecode.336ACSR R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus
Linecode=336ACSR Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=0.707
Set voltagebases="40"
Calcv
Solve
Show Powers

Dr.- Ing. Abdalkarim Awad

19

Reactive Compensation

Key idea of reactive compensation is to supply reactive


power locally. In the previous example this can
be done by adding a 16 Mvar capacitor at the load
16.8 MW

16.0 MW

6.4 MVR

0.0 MVR
44.94 kV

16.8 MW
6.4 MVR

40.0 kV

16.0 MW
16.0 MVR

16.0 MVR

Compensated circuit is identical to first example with


justDr.-real
power load
Ing. Abdalkarim Awad
20

Simulation-Script
clear
New Circuit.Example3_0
! Creates voltage source
(Vsource.Source)
Edit Vsource.Source BasekV=40 pu=1.137 frequency=50
ISC1=2500 Angle=0 !Define source V and Z
New Linecode.336ACSR R1=5 X1=40 C1=0 Units=Km
New Line.LINE1 Bus1=SourceBus Bus2=LoadBus
Linecode=336ACSR Length=1 Units=Km
New Load.LOAD1 Bus1=LoadBus kV=40 kW=16000 PF=0.707
New capacitor.C1 Bus1=LoadBus kV=40 kvar=16000
Set voltagebases="40"
Calcv
Solve
Show Powers

Dr.- Ing. Abdalkarim Awad

21

Important Commands
Start with Clear

clear
Set the default frequency (one time is enough)

Set DefaultBaseFrequency=50
If the frequency is wrong, it will not work!

Dr.- Ing. Abdalkarim Awad

22

Components
Define a new circuit

New circuit New circuit.example basekV=132 pu=1.0


angle=0 frequency=50 phases=3
if the slack bus has a voltage different from 1.0pu,
then change it accordingly (e.g., pu=1.05)

Dr.- Ing. Abdalkarim Awad

23

Components

Substation transformer
new transformer.SS phases=3 windings=2
buses=(sourcebus, busone) conns=(wye, wye) kvs=(132, 40)
kvas=(30000, 30000) %loadloss=0 xhl=12.5

Lines
Produce linecodes (it is a more organised way)

new linecode.Code1 nphases=3 R1=5 X1=40


units=km
Create the corresponding lines
new line.line12 bus1=A bus2=B length=1 phases=3 units=km
linecode=Code1
Dr.- Ing. Abdalkarim Awad

24

Components
Loads
new load.loadB bus1=B phases=3 kV=33 kW=16000
pf=0.95 model=1

In practice, load is the sum of constant power,


constant impedance, and, in some cases,
constant current load terms: ZIP load.
2
V 2

V
V
V
P P0 Z p I p Pp Q Q0 Z q I q Qq
V0
V0
V0

V0

Z p I p Pp 1.0
Dr.- Ing. Abdalkarim Awad

Z q I q Pq 1.0
25

new load.house1 bus1=house1 phases=3 kV=0.4


kW=10 pf=0.95 Vmaxpu=1.2 Vminpu=0.8
Model=8 ZIPV=[0.85 -1.12 1.27 0 0 0 0.8]
ZIPV= Array of 7 coefficients:
First 3 are ZIP weighting factors for active power (should sum to
1)
Next 3 are ZIP weighting factors for reactive power (should sum
to 1)
Last 1 is cutoff voltage in p.u. of base kV; load is 0 below this
cutoff
No defaults; all coefficients must be specified if using model=8.

Dr.- Ing. Abdalkarim Awad

26

Components
Loads
new load.loadB bus1=B phases=3 kV=33 kW=16000
pf=0.95 model=1
PV
new PVsystem.PVPark bus1=LoadBus phases=3
kV=40 KVA=16000 irrad=0.7 Pmpp=16000
kvar=5000 temperature=25
Battery
New Storage.ES1 Phases=3 Bus1=Busthree kV=0.4
kWRated=3 kWhRated=10 pf=1.0 %stored=50.0
dispmode=trigger state=IDLING
Storage.ES1.state=CHARGING
Dr.- Ing. Abdalkarim Awad

27

Important Commands
Control modes
set controlmode=static
Ideal for snapshot and hourly time-series analyses
Type of solution
set mode=snapshot
Solve
Write the solve command

Dr.- Ing. Abdalkarim Awad

28

Important Commands
Per unit voltages

set voltagebases=[132 33]


calcvoltagebases
This command is for internal purposes (not for CSV
exports)
Show command show summary

show voltages LL
show currents
show powers Ele

Dr.- Ing. Abdalkarim Awad

29

Example

First solve
basic circuit
Power Consumed
in the load?
400000 V
I
4000 Amps
1000
Loss?
V 400000 (5 j 40) 4000
42000 j16000 44.920.8 kV
S V I * 44.9k20.8 4000
17.9820.8 MVA 16.8 j 6.4 MVA
Dr.- Ing. Abdalkarim Awad

30

Example1

sourcebus

Busone

LoadBus
5+40j

132/40

Dr.- Ing. Abdalkarim Awad

16MW

31

Example3_1-Script
Run the example
How much losses dow we have?
Change the power factor of the load to 0.7
How much losses do we have now?
Add a capacitor bank to reduce the active power
losses.

Dr.- Ing. Abdalkarim Awad

32

Loadshapes

Dr.- Ing. Abdalkarim Awad

33

Example

100kW
P1

P2

BUS1

BUS2
y12=-10j
y23=-10j

y13=-10j

BUS3

Wind

Load

34

Define loadshapes
Two ways
Either entering the values directly:

new loadshape.loadday npts=24 interval=1.0


~ mult=(.3 .3 .3 .35 .36 .39 .41 .6 .67 .70 .62 0.7 .87
.91 .95 .95 1.0 .98 .94 .92 .61 .60 .51 .44)
Or store the data in a file (one value per line)

new loadshape.windday npts=24 interval=1.0


csvfile=wind.txt

Dr.- Ing. Abdalkarim Awad

35

Example 3_2-Script
Run the example
What is the voltage at 5 PM?
Add resistance to the cables
How much losses do we have?
What is the voltage at 5 PM?

Dr.- Ing. Abdalkarim Awad

36

DSS Bus Model (Bus Node)


Nodes

2 3

4
Bus

Referring to Buses and Nodes (A Bus has 1 or more Nodes)


Bus1=BusName.1.2.3.0
(This is the default for a 3-phase circuit element)
Shorthand notation for taking the default
Bus1=BusName
Note: Sometimes this can bite you (e.g. Transformers, or
capacitors with ungrounded neutrals)

Specifying Bus Connections

Shorthand (implicit)
New Load.LOAD1 Bus1=LOADBUS
Assumes standard 3-phase connection by default
LOADBUS

6
5
4
3
2
1
0

LOAD

Specifying Bus Connections

LOADBUS

Explicit
New Load.LOAD1 Bus1=LOADBUS.1.2.3.0
Explicitly defines which node

6
5
4
3

New Load.1-PHASELOAD Phases=1


Bus1=LOADBUS.2.0

2
1

LOAD

Connects 1-phase load to


Node 2 and ground

0
1-ph Load connected to
phase 2

1-Phase Load Example

Specifying Bus Connections

Ungrounded-Wye Specification
Bus1=LOADBUS.1.2.3.4
Node number)

(or some other unused

LOADBUS

Voltage at this Node is


explicitly computed
(just like any other
Node)

6
5
4
3
2

LOAD

1
0

Neutral

Circuit Element Conductors are


Connected to the Nodes of Buses

MyBus
Terminal 1

Pow er Deliv ery


Element

Terminal 2

Pow er Deliv ery


Element

Terminal 1

3
2
Iterm = [Yprim] Vterm

Iterm = [Yprim] Vterm

. . . Bus2 = MyBus.2.1.3.0 . . .

. . . Bus1 = MyBus . . .
(take the default)

(Explicitly define connections)

DSS Convention: A Terminal can be connected to only one Bus.


You can have any number of Nodes at a bus.

Terminal 2

Example 3_3

ZIP model
House1

House2
PV

Dr.- Ing. Abdalkarim Awad

House3

42

Example3_3-Scripts
Run the example
What is the voltage at house 3?
Decrease the load at house 3 and increase the
supply from the PV
What is the voltage at house 3 now?

Dr.- Ing. Abdalkarim Awad

43

References
http://sourceforge.net/projects/electricdss/
OpenDSS documentation
OpenDSS training Matrial by EPRI
OpenDSS Training Material by Dr Luis(Nando)
Ochoa

Dr.- Ing. Abdalkarim Awad

44

You might also like