Anda di halaman 1dari 138

Tutorial

TheOpenDSS Application
RogerC.Dugan
Sr.TechnicalExecutive rdugan@epri.com Knoxville,Tennessee37934USA

4th International Conference on

Conference Sponsors

Associate Sponsors

Integration of Renewable and Distributed Energy Resources


December 6-10, 2010 4th International Conference on Integration USA Albuquerque, NM, of Renewable and Distributed Energy Resources

Introduction

4th International Conference on Integration of Renewable and Distributed Energy Resources

WhatisOpenDSS?
EPRIs DistributionSystemSimulator(DSS)
Releasedasopensource CalledOpenDSS

Canbefoundat:
WWW.SOURCEFORGE.NET
(SearchforOpenDSS)

Or,emailrdugan@epri.com andrequestalinkto thelatestOpenDSS onEPRIs FTPsite.


4th International Conference on Integration of Renewable and Distributed Energy Resources

WhywasDSSDeveloped?
Forspecialdistributionanalysisapplications suchasDGanalysis. Toprovideaveryflexibleresearchplatform. Fillsgapsleftbyotherdistributionsystem analysistools. Studynewapproachestodistributionsystem analysis.

4th International Conference on Integration of Renewable and Distributed Energy Resources

WhyOpenSource?
EPRIhasmadetheDSSopensourceto:
CooperatewithvariousSmartGridopensource efforts
GridlabD(fromPNL),forexample

Toencouragenewadvancementsindistribution systemanalysis Topromotegridmodernization/SmartGrideffortsby providingresearchersandconsultantswithatoolto evaluateadvancedconcepts ExpandthepoolofSmartGridtechnologyresources availabletoEPRImembers


4th International Conference on Integration of Renewable and Distributed Energy Resources

DSSBackground
Underdevelopmentformorethan13Years
StartedatElectrotek Conceptsin1997 PurchasedbyEPRIin2004

Objectivesin1997
Supportalldistributionplanningaspectsofdistributedgeneration Implementaflexibleresearchplatform Incorporateobjectorienteddataideas

KeyFuturework
SmartGridresearchanddemonstrations DSEforNorthAmericanSystems Denseurbannetworks Reliabilitymethodsresearch
6

4th International Conference on Integration of Renewable and Distributed Energy Resources

DistributionSystemSimulator(DSS)
Designedtosimulateutilitydistributionsystems
Inarbitrarydetail Formosttypesofanalysesrelatedtodistributionplanning.

Itperformsitsanalysistypesinthefrequency domain,
Powerflow, Harmonics,and Dynamics.

ItdoesNOTperformelectromagnetictransients(timedomain) studies.
4th International Conference on Integration of Renewable and Distributed Energy Resources

Time andLocationDependentBenefits
TheOpenDSSwasdesignedfromthebeginningto captureboth
Timespecificbenefits and Locationspecificbenefits

Neededfor
DGanalysis Renewablegeneration Energyefficiencyanalysis PHEVandEVimpacts Otherproposedcapacityenhancementsthatdontfollow typicalloadshapes
8

4th International Conference on Integration of Renewable and Distributed Energy Resources

Time andLocationDependentBenefits
Mosttraditionaldistributionsystemanalysisprograms
Designedtostudypeakloadingconditions Capturemostlylocationspecificbenefits Ignorestime;Assumesresourceisavailable ThisgetsthewronganswerformanyDG,energyefficiency, andSmartGridanalyses

Mustdotimesequenceanalysistogettherightanswer
Overdistributionplanningarea

4th International Conference on Integration of Renewable and Distributed Energy Resources

OverallModelConcept

Inf. Bus (Voltage, Angle)

Power Delivery System

Comm Msg Queue 1 Power Conversion Element ("Black Box") Control Center

Comm Msg Queue 2

Control

4th International Conference on Integration of Renewable and Distributed Energy Resources

10

ExamplesofAdvancedOpenDSSApplications (otherthanbasicmultiphasepowerflow)
Neutraltoearth(stray)voltage simulations. Lossevaluationsdueto unbalancedloading. DevelopmentofDGmodelsfor theIEEERadialTestFeeders. Highfrequencyharmonicand interharmonic interference. Losses,impedance,and circulatingcurrentsinunusual transformerbankconfigurations. Transformerfrequencyresponse analysis.
4th International Conference on Integration of Renewable and Distributed Energy Resources

Distributionautomationcontrol algorithmassessment. Impactoftankless waterheaters onflickeranddistribution transformers. Windfarmcollectorsimulation. Windfarmimpactonlocal transmission. WindgenerationandotherDG impactonswitchedcapacitors andvoltageregulators. Openconductorfaultconditions withavarietyofsinglephaseand threephasetransformer connections.
11

ComputingAnnualLosses
Peakloadlossesarenotnecessarilyindicativeof annuallosses
70 60

25000 20000 15000 kWh 10000 5000 5 9 0 21 Apr Jul Oct Month 17

50

Load, MW

40

30

20

10

Hour

13

4th International Conference on Integration of Renewable and Distributed Energy Resources

Jan

12

UsingDSStoDetermineIncremental CapacityofDG
Needle Peaking System
1600 1400 1200 1000

Capacity Gain for 2 MW CHP


7000 6000 Base_Case 2MW_CHP Incr. Cap. 14 12 10 8 6 4 2 0 210
Incr. Cap., MW

800 600 400 200 4 0 10 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 13 7 1

MWh

5000
MWh EEN

4000 3000 2000 1000 0 150

Hour

16 19

22

Month

6000

160

170

180
MW Load

190

200

5000

4000

KW 3000

2000

How much more power can be served at the same risk of unserved energy?
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

1000

Broad Summer Peaking System


4th International Conference on Integration of Renewable and Distributed Energy Resources

S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12

Month

13

DGDispatch
5000 2500 4500 2000

4000 kvar 3500

1500

1000 Reactive Power, kvar

3000 Power, kW

500

2500

2000 kW 1500

-500

-1000

1000

-1500

500

-2000

0 1077 1346 1615 1884 2153 2422 2691 2960 3229 3498 3767 4036 4305 4574 4843 5112 5381 5650 5919 6188 6457 6726 6995 7264 7533 7802 8071 8340 8609 270 539 808 1

-2500

Hour

4th International Conference on Integration of Renewable and Distributed Energy Resources

14

SolarPVSimulation 1hrData
5 Without PV Difference 4 4 With PV 5

-1 2 Weeks

-1

4th International Conference on Integration of Renewable and Distributed Energy Resources

Difference, MW

MW

15

1secSolarData CloudTransients
1-Sec Solar PV Output Shape with Cloud Transients
1 0.9 Per Unit of Maximum 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 500 1000 1500 Time,s 2000 2500 3000

Impact on Feeder Voltage

4th International Conference on Integration of Renewable and Distributed Energy Resources

16

PowerDistributionEfficiency
350 300 250 Losses, kW 200 No-Load Losses 150 100 50 Load Losses 0 0 50 100 Hour (1 Week) 150 Total Losses

Peak Load Week


350 300 250 Losses, kW 200 150 100 Load Losses No-Load Losses 0 5200 5250 5300 Hour (1 Week) 5350 Total Losses

Light Load Week

50

4th International Conference on Integration of Renewable and Distributed Energy Resources

17

WindPlant1sSimulation
4000 3000 2000 1000

Active and Reactive Power

P3-(kW) (W)

1.03
0 -91 Q3-(kvar) (VAr) -191 -291 -391

Feeder Voltage and Regulator Tap Changes

1.02 1.01 1.00 0.99 0.98

-491

0.97
0 Electrotek Concepts 20000 40000 Time (s) 60000 80000 1.02 TOP, The Output Processor

Ta p -(p u )

(V )

-591

1.00 0.98 0.96 0 20000 40000 Time (s) 60000 80000 TOP, The Output Processor

Electrotek Concepts

4th International Conference on Integration of Renewable and Distributed Energy Resources

18

Broadband Driving Point Admittance


0.035 0.03 0.025
Siemens

0.02 |Y| 0.015 0.01 0.005 0 0 100000 200000 300000 400000 500000
19

4th International Conference on Integration of Renewable and Distributed Energy Resources

Frequency, Hz

PowerFlowVisualization

4th International Conference on Integration of Renewable and Distributed Energy Resources

20

GettingStarted
InstallationandBasicUsage

4th International Conference on Integration of Renewable and Distributed Energy Resources

SourceForge.Net LinksforOpenDSS
OpenDSSDownloadFiles:
http://sourceforge.net/projects/electricdss/files/

MainPageinWiki
http://sourceforge.net/apps/mediawiki/electricdss/index.php?title=Main_Page

ToplevelofMainRepository
http://electricdss.svn.sourceforge.net/viewvc/electricdss/

SourceCode
http://electricdss.svn.sourceforge.net/viewvc/electricdss/Source/

Examples
http://electricdss.svn.sourceforge.net/viewvc/electricdss/Distrib/Examples/

IEEETestCases
http://electricdss.svn.sourceforge.net/viewvc/electricdss/IEEETestCases/

4th International Conference on Integration of Renewable and Distributed Energy Resources

22

ReleaseFileDownloadPage

This is a Release Version

4th International Conference on Integration of Renewable and Distributed Energy Resources

23

WikiHomePage

4th International Conference on Integration of Renewable and Distributed Energy Resources

24

RepositoryonSourceForge.Net

4th International Conference on Integration of Renewable and Distributed Energy Resources

25

ReleaseVersionsVs.SourceCode
ReleaseversionsarepostedirregularlyonSourceForge Youcankeepupwiththelatestchangesbyaccessing thesourcecodeandbuildingthelatestversion LatestbuildsarealsopostedonanEPRIFTPsite
RequestalinkfromEPRI(seeWikiNewsandNotes)

Compilers
Delphi2010 Thisiswhatweusefordevelopment
Delphi2007and2009alsoworkedlasttimewetried

FreePascal(withlimitations)www.freepascal.org

4th International Conference on Integration of Renewable and Distributed Energy Resources

26

AccessingtheSourceForge.Net SourceCode RepositorywithTortoiseSVN


Installa32bitTortoiseSVN clientfrom tortoisesvn.net/downloads. Recommendation:
FromtheTortoiseSVN GeneralSettingsdialogandclickthelastcheck box,touse"_svn"insteadof".svn"forlocalworkingdirectoryname. Then,tograbthefilesfromSourceForge: 1 createacleandirectorysuchas"c:\opendss" 2 rightclickonitandchoose"SVNCheckout..."fromthemenu 3 therepositoryURLis
http://electricdss.svn.sourceforge.net/svnroot/electricdss

Changethecheckoutdirectoryifitpointssomewhereotherthanwhat youwant.

4th International Conference on Integration of Renewable and Distributed Energy Resources

27

ProgramFiles
OpenDSS.EXE OpenDSSEngine.DLL KLUSolve.DLL DSSgraph.DLL StandaloneEXE InprocessCOMserver Sparsematrixsolver DSSgraphicsoutput

Copythesefilestothedirectory(folder)ofyourchoice
Typicallyc:\OpenDSS or c:\Program Files\OpenDSS

IfyouintendtodriveOpenDSSfromanotherprogram,youwill needtoregistertheCOMserver
Someprogramsrequirethis!!

4th International Conference on Integration of Renewable and Distributed Energy Resources

28

OpenDSSFolders

4th International Conference on Integration of Renewable and Distributed Energy Resources

29

OpenDSSStandaloneEXEUserInterface

Multiple script windows

Any script window may be used at any time.

4th International Conference on Integration of Renewable and Distributed Energy Resources

30

ExecutingScriptsintheStandaloneEXE

Select all or part of a line

Right-Click to get this pop-up menu

DSS executes selected line or opens selected file name Any script window may be used at any time.
4th International Conference on Integration of Renewable and Distributed Energy Resources

31

DSSStructure
Scripts

COM Interface

Main Simulation Engine

Scripts, Results

UserWritten DLLs

4th International Conference on Integration of Renewable and Distributed Energy Resources

32

DSSObjectStructure
DSS Executive Commands Options Circuit V Solution [Y] I

PDElement Line Transformer Capacitor Reactor

PCElement Load Generator Vsource Isource Storage

Controls RegControl CapControl Relay Reclose Fuse

Meters Monitor EnergyMeter Sensor

General LineCode LineGeometry WireData LoadShape GrowthShape Spectrum TCCcurve XfmrCode


33

4th International Conference on Integration of Renewable and Distributed Energy Resources

DSSClassStructure
Instances of Objects of this class Class Property Definitions Class Property Editor Collection Manager Object 1 Property Values Methods Yprim States

Object n Property Values Methods Yprim States


4th International Conference on Integration of Renewable and Distributed Energy Resources

34

ScriptingBasics
Syntaxandorganizingyourscripts

4th International Conference on Integration of Renewable and Distributed Energy Resources

Scripting
OpenDSSisascriptablesolutionengine Scripts
Seriesofcommands Fromtextfiles FromeditformsinOpenDSS.EXE FromanotherprogramthroughCOMinterface
e.g.,Thisishowyouwoulddolooping

Scriptsdefinecircuits Scriptscontrolsolutionofcircuits Scriptsspecifyoutput,etc.


4th International Conference on Integration of Renewable and Distributed Energy Resources

36

CommandSyntax
Commandparm1,parm2parm3parm 4. Parametersmaybepositional ornamed (tagged). Ifnamed,an"="signisexpected.
Name=value (thisisthenamedform) Value (valuealoneinpositionalform)

Forexample,thefollowingtwocommandsare equivalent:
New Object="Line.First Line" Bus1=b1240 LineCode=336ACSR,
New Line.First Line, b1240 32

Bus2=32

336ACSR,

4th International Conference on Integration of Renewable and Distributed Energy Resources

Comma or white space

37

Delimiters
Arrayorstringdelimiterpairs: [],{},(), , Matrixrowdelimiter: | Valuedelimiters: , (comma) anywhitespace(taborspace) Class,Object,Bus,orNodedelimiter: . (period) Keyword/valueseparator: = Continuationofpreviousline: ~ (More) Commentline: // Inlinecomment: ! Queryaproperty: ?

4th International Conference on Integration of Renewable and Distributed Energy Resources

38

ArrayandMatrixParameters
Array
kvs =[115,6.6,22] kvas=[200001600016000]

Matrix
(3x3matrix)
Xmatrix=[1.2.3.3 |.31.23|.3.3 1.2]

(3x3matrix lowertriangle)
Xmatrix=[1.2|.31.2|.3.3 1.2]

4th International Conference on Integration of Renewable and Distributed Energy Resources

39

ArraysfromFiles
Mult=[1,2,3,4,5,..etc] Mult=[file=myfile.txt] Mult=[dblfile=myfile.dbl] Mult=[sngfile=mufile.sng] SeeURL:
http://sourceforge.net/apps/mediawiki/electricdss/index.php?title=TechNote_New_way s_to_import_loadshapes

4th International Conference on Integration of Renewable and Distributed Energy Resources

40

ABasicScript(ClassExercise)
TR1 LINE1 1 Mile, 336 ACSR Sourcebus Sub_bus 12.47 kV LOAD1 1000 kW 0.95 PF

Source 115 kV

Loadbus

New Circuit.Simple

! Creates voltage source ISC3=3000

(Vsource.Source) ISC1=2500 !Define source V and Z

Edit Vsource.Source BasekV=115 pu=1.05

New Transformer.TR1 Buses=[SourceBus, Sub_Bus] Conns=[Delta Wye] kVs= [115 12.47] ~ kVAs=[20000 20000] XHL=10 New Linecode.336ACSR R1=0.058 X1=.1206 R0=.1784 X0=.4047 C1=3.4 C0=1.6 Units=kft New Line.LINE1 Bus1=Sub_Bus Bus2=LoadBus Linecode=336ACSR Length=1 Units=Mi New Load.LOAD1 Bus1=LoadBus kV=12.47 kW=1000 PF=.95 Solve Show Voltages Show Currents Show Powers kVA elements
4th International Conference on Integration of Renewable and Distributed Energy Resources

41

Circuit
NewCircuit.Simple !(Vsource.Source isactivecircuitelement) EditVsource.Source BasekV=115pu=1.05ISC3=3000ISC1=2500
SourceBus

Vsource.Source

Source

115 kV, 1.05 pu

115

kV

Short Circuit Impedance (a matrix) that yields 3000A 3ph fault current and 2500A 1-ph fault current. One-Line Diagram (default is 3-phase wye-grd source)

4th International Conference on Integration of Renewable and Distributed Energy Resources

42

Vsource ElementNote
Vsource isactuallyaTwo terminalDevice
2nd terminaldefaultsto connectedtoground(0V) Butyoucanconnectit betweenanytwobuses
Comesinhandysometimes

ConceptuallyaThevinen equivalent
Shortcircuitequivalent ConvertedtoaNorton equivalentinternally

4th International Conference on Integration of Renewable and Distributed Energy Resources

43

20MVASubstationTransformer
TR1

SourceBus

Sub_Bus

Defining Using Arrays

Defining Winding by Winding

New Transformer.TR1 Phases=3 Windings=2 ~ Buses=[SourceBus, Sub_Bus] ~ Conns=[Delta Wye] ~ kVs= [115 12.47] ~ kVAs=[20000 20000] ~ XHL=10

New Transformer.TR1 Phases=3 Windings=2 XHL=10 ~ wdg=1 bus=SourceBus Conn=Delta kV=115 kVA=20000 ~ wdg=2 bus= Sub_Bus Conn=wye kV=12.47 kVA=20000

4th International Conference on Integration of Renewable and Distributed Energy Resources

2 Ways to Define
44

TheLine
Sub_Bus
LINE 1 1 Mile, 336

LoadBus

New Linecode.336ACSR R1=0.058 X1=.1206 R0=.1784 X0=.4047 C1=3.4 C0=1.6 Units=kft New Line.LINE1 Bus1=Sub_Bus Bus2=LoadBus Linecode=336ACSR Length=1 Units=Mi

Line objects may also be defined by Geometries and using matrices

4th International Conference on Integration of Renewable and Distributed Energy Resources

45

TheLoad

Loadbus

LOAD 1 1000 kW 0. 95 PF

New Load.LOAD1 Bus1=LoadBus kV=12.47 kW=1000 PF=.95 For 3-phase loads, use L-L kV and total kW For 1-phase loads, typically use L-N kV and total kW unless Delta-connected; Then use L-L kV.
4th International Conference on Integration of Renewable and Distributed Energy Resources

46

ModelingBasics
CircuitElements,Buses,etc

4th International Conference on Integration of Renewable and Distributed Energy Resources

DSSBusModel

2 3

Referring to Buses and 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)

4th International Conference on Integration of Renewable and Distributed Energy Resources

48

DSSTerminalDefinition

1 Power Delivery or Power Conversion Element

4th International Conference on Integration of Renewable and Distributed Energy Resources

49

PowerDeliveryElements (PDElements)

Terminal 1

Power Delivery Element

Terminal 2

Iterm = [Yprim] Vterm

4th International Conference on Integration of Renewable and Distributed Energy Resources

50

PowerConversionElements (PCElements)
ITerm(t) = F(VTerm, [State], t)

F V
Power Conversion Element

4th International Conference on Integration of Renewable and Distributed Energy Resources

51

SpecifyingBusConnections Shorthand(implicit)
NewLoad.LOAD1Bus1=LOADBUS Assumesstandard3phaseconnectionbydefault

LOADBUS

6 5 4 3 2 1 0 LOAD

4th International Conference on Integration of Renewable and Distributed Energy Resources

52

SpecifyingBusConnections Explicit
NewLoad.LOAD1Bus1=LOADBUS.1.2.3.0
LOADBUS

Explicitlydefineswhichnode

NewLoad.1PHASELOADPhases=1Bus1=LOADBUS.2.0
Connects1phaseloadtophase2andground
6 5 4 3 2 1 0 1-ph Load connected to phase 2 LOAD

4th International Conference on Integration of Renewable and Distributed Energy Resources

53

SpecifyingBusConnections DefaultBustemplates
Nodeconnectionsassumedifnotexplicitlydeclared

ElementdeclaredPhases=1
LOADBUS.1.0.0.0.0.0.0.0.0.0.

ElementdeclaredPhases=2
LOADBUS.1.2.0.0.0.0.0.0.0.0.

ElementdeclaredPhases=3
LOADBUS.1.2.3.0.0.0.0.0.0.0.

4th International Conference on Integration of Renewable and Distributed Energy Resources

54

SpecifyingBusConnections UngroundedWye Specification


Bus1=LOADBUS.1.2.3.4 number) (orsomeotherunusedNode
LOADBUS

6 5 4 3 2 1 0 LOAD

Neutral
4th International Conference on Integration of Renewable and Distributed Energy Resources

55

SpecifyingTwoUngroundedWye CapacitorsonSameBus
MyBus

Bus1=MyBus.1.2.3 Bus2=MyBus.5.5.5
6 5 4 3 2 1 0

Neutrals are not connected to each other!

Bus1=MyBus Bus2=MyBus.4.4.4

4th International Conference on Integration of Renewable and Distributed Energy Resources

56

CircuitElementsareConnectedtogetherat theNodesofBuses
MyBus
Terminal 1 Power Delivery Element Terminal 2 Terminal 1 Power Delivery Element Terminal 2

3 2
Iterm = [Yprim] Vterm Iterm = [Yprim] Vterm

. . . Bus2 = MyBus.2.1.3.0 . . .
(Explicitly define connections)

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

DSS Convention: A Terminal can be connected to only one Bus. You can have any number of Nodes at a bus.
4th International Conference on Integration of Renewable and Distributed Energy Resources

57

Example:Connectionsfor1Phase ResidentialTransformer
! Line-to-Neutral Connected 1-phase Center-tapped transformer New Transformer.Example_1-ph phases=1 Windings=3 ! Typical impedances for small transformer with interlaced secondaries ~ Xhl=2.04 Xht=2.04 Xlt=1.36 %noloadloss=.2 ! Winding Definitions ~ wdg=1 Bus=Bus1.1.0 kV=7.2 kVA=25 %R=0.6 Conn=wye ~ wdg=2 Bus=Bus2.1.0 kV=0.12 kVA=25 %R=1.2 Conn=wye ~ Wdg=3 Bus=Bus2.0.2 kV=0.12 kVA=25 %R=1.2 Conn=wye
Bus 1 1 Bus 2 1 Wdg 2 Wdg 1 0 Wdg 3 0 or 2 2

Note: You may use XfmrCode to define a library of transformer definitions that are used repeatedly (like LineCode for Line elements)

4th International Conference on Integration of Renewable and Distributed Energy Resources

Center-Tapped 1-Phase Transformer Model

58

AllTerminalsofaCircuitElementHave SameNumberofConductors
3-Phase Transformer
1

DELTA-WYE TRANSFORMER 3 PHASES 2 WINDINGS 4 CONDS/TERMINAL*

2 2

3 3

(OPEN) * MUST HAVE THE SAME NUMBER OF CONDUCTORS FOR EACH TERMINAL
4th International Conference on Integration of Renewable and Distributed Energy Resources

59

QuestionsIGet.

4th International Conference on Integration of Renewable and Distributed Energy Resources

HowDoYouGetCurrentsandPowerIfYou OnlySolveforNodeVoltages?
Howarethebranchcurrents(andpowers)determined whenonlytheNodevoltagesandCompensation currentsareknown?
Currentsandpowersaredeterminedbypostprocessingthe solution IftheYmatrixisproperlyformed,thecurrentswillobey Kirchoffs currentlawatthenodes Ifconvergenceisachieved,thepowerswillbecorrect

4th International Conference on Integration of Renewable and Distributed Energy Resources

61

ComputingCurrentsinBranchTerminals (Giventhevoltages)
I1 I2 I3 I4 I5 I6

I1 I2 I3 I4 I5 I6

Yprim
(6 x 6)

V1 V2 V3 V4 V5 V6

4th International Conference on Integration of Renewable and Distributed Energy Resources

62

PossibleSourceofError!
Ifthebranchisextremelyshort(impedanceisvery low),currentsmaybeincorrectlycomputed
Convergencetoleranceisgenerally0.0001pu Voltagesolutionwillbegoodenough

64bitmathisusedthroughoutgivingyouflexibility
However,ifvoltagesatbothendsofbrancharenearlythe same,youwillbetakingthedifferencebetweentwonearly equalnumbersandthemultiplyingitbyalargenumber (veryhighconductance)
Thiswillmagnifyanyerror

Donotuseimpracticallyshortbranches
4th International Conference on Integration of Renewable and Distributed Energy Resources

63

WhereDoesOpenDSSincludeMutual Coupling?
ItALWAYSIncludesit!
AllcircuitelementmodelsprovidetheDSSexecutivewithan AdmittanceMATRIX
Thatis,everymodelimplicitlyhascoupledphases

Unitsonadmittancematrixareactualsiemens
Perunitsandpercentareusedforsomeinputandsomereports,but notforinternalmodel Fewerlimitationsontheproblemthatcanberepresented

4th International Conference on Integration of Renewable and Distributed Energy Resources

64

PrimitiveYMatrix ASimpleExample
I1 R V1 V2 I2

Order of Yprim is Num Terminals * Num Conductors per Terminal

I 1 G I = G 2

G V 1 V G 2

G=R
4th International Conference on Integration of Renewable and Distributed Energy Resources

65

Alittlemorecomplicated
I1 Z11 V3 M12 I4 I3 V1 I2

Z
Z22 V2

V4

Z=

Z11 M12

M12 Z22

I 1 V 1 I 2 1 1 Z V 2 = Z I 3 Z 1 Z 1 V 3 I 4 V 4
4th International Conference on Integration of Renewable and Distributed Energy Resources

66

Yprim
YoucanobtainthePrimitiveYmatrixforeachelement anumberofways(afteraSolve) Dumpcommand
DumpDSSclass.name debug
Or,DumpDSSclass.*debug

Script
ShowYprim !Ofactiveelement ExportYprims !AllYprims

COMInterface
MyVariant =DSSCircuit.ActiveElement.Yprim

4th International Conference on Integration of Renewable and Distributed Energy Resources

67

WhatKindofPowerFlowistheDSS?
TheDSSisnotatraditionalpowerflowaspower engineerstendtothinkofpowerflows
Aprogramwithasolutionmethodforfundamental frequencypowerflow

Itsheritageisharmonicsanalysisanddynamics analysis
Itisapowerflowinthesensethatyoucanmodelloads connectedtobusesandgetasolutionthatmatches traditionalpowerflowprogramsat50/60Hz

4th International Conference on Integration of Renewable and Distributed Energy Resources

68

WhatKindofPowerFlowistheDSS?
TheNormal solutionmodeisafixedpointiterative solutionthatworksfinefor>90%ofdistribution systems
Issimpleandrelativelyfast,especiallyforannualsolutions

ThereisaNewton solutionmethodforcircuitsthat aredifficulttoconvergewiththeNormalmethod.


NottobeconfusedwiththetraditionalNewtonRaphson methodinpowerflowprograms TheJacobian istheYmatrix,whichisnotandexactJacobian, butpointsintherightdirection
Soitislikelytogetthereeventually

4th International Conference on Integration of Renewable and Distributed Energy Resources

69

LoadandBuses
ThereisasubtledifferenceinthewaytheDSS treatsloadsthatisconfusingtotraditionally trainedpowerengineers: Insteadof
ABushasLoad

TheDSShas
ALoadhasaBus

Thelatterallowsconnectionofamultitudeof differentloadsandloadtypestothesamebus
4th International Conference on Integration of Renewable and Distributed Energy Resources

70

Canitsolvenetworksystemsaswellas radial?
TheuseofthewordDistribution inthenameofthe programconjuresupideasofradialcircuitsolversin NorthAmerica(butnotnecessarilyinEurope) TheDSScircuitsolveriscompletelygeneralandhasno ideawhetherthecircuitisradialornot.
Thisisarequirementforharmonicsanalysisofdistribution systems

TheEnergyMeter classispresentlytheonlyclassthat caresaboutradiality.


4th International Conference on Integration of Renewable and Distributed Energy Resources

71

WhereisthePVbustype?
BusesdonothavespecialtypesintheDSS
Busesaresimplyconnectionpointsforcircuitelements

AGeneratorcancontrol(orattemptto)powerand voltage
(Thismodelcanbecantankerous)

Thisquestionusuallyariseswithregardtomodeling DGondistributionsystems
Fortunately,oneseldomneedsthismodelunlesstheDGis quitelargewithrespecttosystemcapacity MostotherDGiscontrolledbyPowerandPowerFactor whileinterconnected
Simplertomodel
4th International Conference on Integration of Renewable and Distributed Energy Resources

72

Examples

4th International Conference on Integration of Renewable and Distributed Energy Resources

StorageExample

4th International Conference on Integration of Renewable and Distributed Energy Resources

Scriptfor75kWhSimulation
CompileC:\DSSdata\Wes\Colfax\Master.DSS RedirectAllocateLoadsandMeters.DSS BusCoords colfax21_EXP_BUSCOORDS.CSV BusCoords buscoordsCES.DSS !COORDINATESOFCESLOCATIONS Setmaxcontroliter=20 !******ADDSTORAGE*************************** redirectCES.DSS RedirectSet_For_75kWh.DSS !DEFINESTORAGECONTROLLER NewStorageController.CESmain element=line.568_4921721terminal=1 ~kWTarget=7500PFTarget=0.98 ~%ratecharge=30 ~eventlog=y ~modedischarge=follow !SPECIALMONITORS Newmonitor.Store Storage.jo02110001731mode=1ppolar=no Newmonitor.StoreVars Storage.jo02110001731mode=3 solve SetCasename=StorageOn75 redirectannualscript.dss !************************************************************************* showmon store showmon storevars fileedit C:\DSSdata\Wes\Colfax\StorageOn75\DI_yr_1\feeder.csv

Controller Definition

4th International Conference on Integration of Renewable and Distributed Energy Resources

75

Load Shapes With and Without Storage 8000 kW Trigger, 75 kWh Storage, 20% charge @ 2AM
10000 9000 8000 7000 6000 5000 4000 3000 2000 1000 0 180 200 220 240 Hours
4th International Conference on Integration of Renewable and Distributed Energy Resources

Simple PeakShave Mode

"kWh Normal" "kWh"

kW

260

280

300

76

Load Shapes With and Without Storage Variable Trigger, 75 kWh Storage, 30% charge @ 2AM
10000 9000 8000 7000 6000 5000 4000 3000 2000 1000 0 0 100 200 Hours
4th International Conference on Integration of Renewable and Distributed Energy Resources

"kWh Normal" "kWh"

kW

Variable Triggering Simulation Assumes a Controller that can accurately predict daily load and know when to trigger.
300 400 500

77

OpenDSSScriptforVariableTriggering ExampleonPreviousSlide
!DOPARTOFAYEARINYEARLYMODE setmode=yearlystepsize=0.25h Setoverloadreport=true!TURNOVERLOADREPORTON setvoltexceptionreport =true setdemand=true setDIVerbose=true SetYear=1 solvenumber=760 StorageController.CESmain.kWtarget=8000 solvenumber=120 StorageController.CESmain.kWtarget=7500 solvenumber=96 StorageController.CESmain.kWtarget=7000 solvenumber=472 StorageController.CESmain.kWtarget=7500 solvenumber=200 StorageController.CESmain.kWtarget=7000 solvenumber=(2784200 472 96 120 760)!Balanceof2784 closeDI
4th International Conference on Integration of Renewable and Distributed Energy Resources

78

Example: IEEE8500Node TestFeeder

4th International Conference on Integration of Renewable and Distributed Energy Resources

Location

4th International Conference on Integration of Renewable and Distributed Energy Resources

80

MainPartofRunFile

Compile (C:\DSSdata\IEEETest\8500Node\Master-unbal.dss)

! unbalanced load master

New Energymeter.m1 Line.ln5815900-1 1

! Put an Energymeter at the head of the feeder

Set Maxiterations=20

! Sometimes the solution takes more than the default 15 iterations

Solve

4th International Conference on Integration of Renewable and Distributed Energy Resources

81

TheMasterFile
Clear NewCircuit.IEEE8500u !Makethesourcestiffwithsmallimpedance ~pu=1.05r1=0x1=0.001r0=0x0=0.001 RedirectLineCodes2.dss RedirectTriplex_Linecodes.dss RedirectLines.dss RedirectTransformers.dss RedirectLoadXfmrs.dss !LoadTransformers RedirectTriplex_Lines.dss RedirectUnbalancedLoads.dss RedirectCapacitors.dss RedirectCapControls.dss RedirectRegulators.dss !LetDSSestimatethevoltagebases Setvoltagebases=[115,12.47,0.48,0.208] Calcvoltagebases !Thisalsoestablishesthebuslist !Loadinbuscoordinatesnowthatbuslistisestablished Buscoords Buscoords.dss
4th International Conference on Integration of Renewable and Distributed Energy Resources

82

SolutionSummary
Status=SOLVED SolutionMode=Snap Number=100 LoadMult =1.000 Devices=7281 Buses=4876 Nodes=8561 ControlMode=STATIC TotalIterations=62 ControlIterations=5 MaxSolIter =16 CircuitSummary Year=0 Hour=0 Maxpu.voltage=1.05 Minpu.voltage=0.91084 TotalActivePower:12.0452MW TotalReactivePower:1.44513Mvar TotalActiveLosses:1.27202MW,(10.56%) TotalReactiveLosses:2.8252Mvar Frequency=60Hz Mode=Snap ControlMode=STATIC LoadModel=PowerFlow

4th International Conference on Integration of Renewable and Distributed Energy Resources

83

PowerFlowSolutionPlot
Plot Circuit Power Max=2000 dots=n labels=n subs=y C1=$00FF0000 1ph=3

4th International Conference on Integration of Renewable and Distributed Energy Resources

84

SelectingaBranchfromthePlot(Zoomed)

4th International Conference on Integration of Renewable and Distributed Energy Resources

85

RightclickandselectProperties

4th International Conference on Integration of Renewable and Distributed Energy Resources

86

Exercisethe8500NodeTestFeeder
(ClassDemo)

4th International Conference on Integration of Renewable and Distributed Energy Resources

DistributedWindApplicationExample

4th International Conference on Integration of Renewable and Distributed Energy Resources

DistributedWindApplication
OpenDSSapplication
Timeseriesload/generationrepresentation Inductionmachinemodeling Windturbinegeneratorvar control
Mechanicallyswitchedcapacitors Constantpowerfactor Voltagecontrol

Regulatorinteraction

4th International Conference on Integration of Renewable and Distributed Energy Resources

89

Oneline Diagram

115kV/12.47kV

600 kvar

66 kW 1.8 Mvar 1.2 Mvar 74 kW 56 kW 1.9 MW 3.5 MW

12.47kV/480V

2x1.8MW wind turbines

4th International Conference on Integration of Renewable and Distributed Energy Resources

90

CircuitDefinition

4th International Conference on Integration of Renewable and Distributed Energy Resources

91

WindTimeSeries

WTG Output
P (kW) 4000 3500 3000 2500 kW,kvar 2000 1500 1000 500 0 -500 -1000 0 6 12 Hour 18 24 Q (kvar)

4th International Conference on Integration of Renewable and Distributed Energy Resources

92

WindPlantImplementation

4th International Conference on Integration of Renewable and Distributed Energy Resources

93

WTGType1,2:CapacitorBankVar Control
Utility Grid

Gearbox

Shaft Speed

Blades

Wound Rotor Induction Machine

Switched Capacitor Banks

Converter

4th International Conference on Integration of Renewable and Distributed Energy Resources

94

CapacitorControlResults
WTG Output
P (kW) 4000 3500 3000 2500 kW,kvar 2000 1500 1000 500 0 -500 -1000 0 6 12 Hour 18 24
Vpu, tap 1 1.02 1.04

Q (kvar)

WTG Voltage

Regulator Tap

0.98

0.96

WTG Capacitors
0 -200 -400 -600 -800
kvar
Cap (kvar)

0.94 0 6 12 Hour 18 24

-1000 -1200 -1400 -1600 -1800 -2000 0 5 10


Hour

15

20

4th International Conference on Integration of Renewable and Distributed Energy Resources

95

WTGType3,4:Active PowerFactor Control


1.2

P, Q (stator)
750 kW woundrotor induction generator

Gearbox

1 Reactive Power Range Active Power (per-unit)

Shaft Speed
P (rotor/converter)

Blades

0.8

Power Converter (line side)

Power Converter (machine side)

0.6

0.4

WTG1 WTG2

Switch Control

iabc(rotor)

Pgen ,Qgen

i*abc(rotor)
Rotor Current Computation Torque Computation

0.2

WTG3

T*

0
Lookup Table (T vs. )

-0.6

-0.4

-0.2

0 Reactive Power (per-unit)

0.2

0.4

0.6

4th International Conference on Integration of Renewable and Distributed Energy Resources

96

PowerFactorControl

WTG Output
P1 (kW) 4000 3000
1.05

Q1 (kvar)

WTG Voltage and Regulator Tap

2000 kW,kvar
1.04

1000 0
Vpu,tap

1.03 1.02 1.01 1 0.99

WTG Voltage Regulator Tap

-1000 -2000 0 6 12 Hour 18

24
0.98 0.97 0.96 0 6 12
Hour

18

24

4th International Conference on Integration of Renewable and Distributed Energy Resources

97

WTGType3,4:VoltageControl

WTG Voltage 1.05

1.03

1.01

0.99

0.97

0.95 0 6 12 18 24

Regulator has no tap operations!!!


4th International Conference on Integration of Renewable and Distributed Energy Resources

98

AdvancedTopics

4th International Conference on Integration of Renewable and Distributed Energy Resources

RegisteringtheCOMServer
InDOSwindow,changetothefolderwhere youinstalleditandtype:
Regsvr32OpenDSSEngine.DLL

GUID

The Server shows up as OpenDSSEngine.DSS in the Windows Registry

4th International Conference on Integration of Renewable and Distributed Energy Resources

100

RegisteringtheCOMServer,contd
If you look up the GUID

Points to OpenDSSEngine.DLL (In-process server, Apartment Threading model)

4th International Conference on Integration of Renewable and Distributed Energy Resources

101

AccessingtheCOMServer
InMATLAB:
DSSobj = actxserver(OpenDSSEngine.DSS);

InVBA:
Public DSSobj As OpenDSSEngine.DSS Set DSSobj = New OpenDSSEngine.DSS

InPYTHON:
self.engine = win32com.client.Dispatch("OpenDSSEngine.DSS")

4th International Conference on Integration of Renewable and Distributed Energy Resources

102

DGScreener Applet
UsingtheOpenDSSViatheCOM Server

4th International Conference on Integration of Renewable and Distributed Energy Resources

DGScreener(Demo)
DevelopedforEPRIProgram174
Availabletofunders Funderscandownloadtheinstallationpackage

Nextversionplannedfor2011
Expectinguserstotryitoutandsuggestchanges EspeciallyCanadianusers
ConcernsaredifferentthanUSusers

4th International Conference on Integration of Renewable and Distributed Energy Resources

104

AppletArchitecture
Main Interfaces Used

DSS Text DR Screening Applet Circuit Solution DSSProgress OpenDSSEngine

DSSGraph.DLL

IndMach012a.DLL

Plot

Scripts, Results

4th International Conference on Integration of Renewable and Distributed Energy Resources

105

DrivingtheOpenDSSviatheCOM ServerfromanotherApplication

4th International Conference on Integration of Renewable and Distributed Energy Resources

Activeobjectsconcept
ThereisoneregisteredInProcessCOM interface:
OpenDSSEngine.DSS
Thatis,theDSSinterfaceistheoneyouinstantiate TheDSSinterfacecreatesalltheothers.

Theinterfacesgenerallyemploytheideaofan ACTIVEobject
Activecircuit, Activecircuitelement, Activebus,etc. Theinterfacesgenerallypointtotheactiveobject
Toworkwithanotherobject,changetheactiveobject.
4th International Conference on Integration of Renewable and Distributed Energy Resources

107

DSSInterface
This interface is instantiated upon loading OpenDSSEngine.DSS and then instantiates all other interfaces

Call the Start(0) method to initialize the DSS

DSS Class Functions (methods) and Properties

4th International Conference on Integration of Renewable and Distributed Energy Resources

108

InstantiatetheDSSInterface andAttemptaStart
Public Sub StartDSS()

' Create a new instance of the DSS Set DSSobj = New OpenDSSengine.DSS ' Start the DSS If Not DSSobj.Start(0) Then MsgBox "DSS Failed to Start" Else MsgBox "DSS Started successfully ' Assign a variable to the Text interface for easier access Set DSSText = DSSobj.Text End If

End Sub

4th International Conference on Integration of Renewable and Distributed Energy Resources

109

COMInterface
Interfaces as Exposed by VBA Object Browser in MS Excel

Text interface is simplest

Text has two Properties

4th International Conference on Integration of Renewable and Distributed Energy Resources

110

AssignaVariabletotheTextInterface
Public Sub StartDSS()

' Create a new instance of the DSS Set DSSobj = New OpenDSSengine.DSS ' Start the DSS If Not DSSobj.Start(0) Then MsgBox "DSS Failed to Start" Else MsgBox "DSS Started successfully ' Assign a variable to the Text interface for easier access Set DSSText = DSSobj.Text End If

End Sub

4th International Conference on Integration of Renewable and Distributed Energy Resources

111

NowUsetheTextInterface
YoucanissueanyoftheDSSscriptcommands fromtheTextinterface
Always a good idea to clear the DSS when loading a new circuit DSSText.Command = "clear" ' Compile the script in the file listed under "fname" cell on the main form DSSText.Command = "compile " + fname Set regulator tap change limits for IEEE 123 bus test case With DSSText .Command = "RegControl.creg1a.maxtapchange=1 This one moves first" .Command = "RegControl.creg2a.maxtapchange=1 .Command = "RegControl.creg3a.maxtapchange=1 .Command = "RegControl.creg4a.maxtapchange=1 .Command = "RegControl.creg3c.maxtapchange=1 .Command = "RegControl.creg4b.maxtapchange=1 .Command = "RegControl.creg4c.maxtapchange=1 .Command = "Set MaxControlIter=30" End With Delay=15 Delay=30 Delay=30 Delay=30 Delay=30 Delay=30 Delay=30 !Allow only one tap change per solution. !Allow only one tap change per solution" !Allow only one tap change per solution" !Allow only one tap change per solution" !Allow only one tap change per solution" !Allow only one tap change per solution" !Allow only one tap change per solution"

4th International Conference on Integration of Renewable and Distributed Energy Resources

112

ResultProperty
TheResultpropertyisaReadOnlypropertythat containsanyresultmessagesthemostrecent commandmayhaveissued.
Errormessages Requestedvalues
Example: Query line length DSSText.Command = ? Line.L1.Length S = DSSText.Result MsgBox S Get the answer

Display the answer

4th International Conference on Integration of Renewable and Distributed Energy Resources

113

CircuitInterface
This interface is used to 1) Get many of the results for the most recent solution of the circuit 2) Select individual circuit elements in a variety of ways 3) Select the active bus 4) Enable/Disable circuit elements

4th International Conference on Integration of Renewable and Distributed Energy Resources

114

CircuitInterface

Since the Circuit interface is used often, it is recommended that a special variable be assigned to it:

Public DSSCircuit As OpenDSSengine.Circuit DSSText.Command = Compile xxxx.dss Set DSSCircuit = DSSobj.ActiveCircuit DSSCircuit.Solution.Solve Retrieving array quantities into variants

V = DSSCircuit.AllBusVmagPu VL =DSSCircuit.AllElementLosses

4th International Conference on Integration of Renewable and Distributed Energy Resources

115

SolutionInterface
The Solution Interface is used to 1) Execute a solution 2) Set the solution mode 3) Set solution parameters (iterations, control iterations, etc.) 4) Set the time and time step size

4th International Conference on Integration of Renewable and Distributed Energy Resources

116

SolutionInterface
Assuming the existence of a DSSCircuit variable referencing the Circuit interface
Set DSSSolution = DSSCircuit.Solution With DSSSolution .LoadModel=dssAdmittance .dblHour = 750.75 .solve

Use the With statement in VBA to simplify coding

End With

4th International Conference on Integration of Renewable and Distributed Energy Resources

117

CktElement Interface
This interface provides specific values of the Active Circuit Element Some values are returned as variant arrays
V = DSSCircuit.ActiveElement.Powers V = DSSCircuit.ActiveElement.seqCurrents V = DSSCircuit.ActiveElement.Yprim

Other values are scalars


Name = DSSCircuit.ActiveElement.Name Nph = DSSCircuit.ActiveElement.NumPhases

4th International Conference on Integration of Renewable and Distributed Energy Resources

118

PropertiesInterface

This interface gives access to a String value of each public property of the active element Val is a read/write property

4th International Conference on Integration of Renewable and Distributed Energy Resources

119

PropertiesInterface
With DSSCircuit.ActiveElement Get all the property names VS = .AllPropertyNames Get a property value by numeric index V = .Properties(2).Val Get same property value by name (VS is 0 based) V = .Properties(VS(1)).Val Set Property Value by Name DSSCircuit.SetActiveElement(Line.L1) .Properties(R1).Val = .068 End With

The last two statements are equivalent to: DSSText.Command = Line.L1.R1=.068


4th International Conference on Integration of Renewable and Distributed Energy Resources

120

LinesInterface

This interface is provided to iterate through all the lines in the circuit and change the most common properties of Lines.

4th International Conference on Integration of Renewable and Distributed Energy Resources

121

Example:SettingallLineCodes toaValue
Set DSSLines = DSSCircuit.Lines . . . sets active

iL = DSSLines.First Do While iL>0

DSSLines.LineCode = MyNewLineCode iL = DSSLines.Next Loop get next line

4th International Conference on Integration of Renewable and Distributed Energy Resources

122

VBAExample
OptionExplicit PublicDSSobj AsOpenDSSengine.DSS PublicDSSText AsOpenDSSengine.Text PublicDSSCircuit AsOpenDSSengine.Circuit PublicSubStartDSS() 'CreateanewinstanceoftheDSS SetDSSobj =NewOpenDSSengine.DSS 'AssignavariabletotheTextinterfacefor easieraccess SetDSSText =DSSobj.Text 'StarttheDSS IfNotDSSobj.Start(0)ThenMsgBox "DSS FailedtoStart" EndSub Define some public variables that are used throughout the project

This routine instantiates the DSS and starts it. It is also a good idea at this time to assign the text interface variable.

4th International Conference on Integration of Renewable and Distributed Energy Resources

123

VBAExample
PublicSubLoadCircuit(fname AsString) 'AlwaysagoodideatocleartheDSSwhenloadinganew circuit DSSText.Command ="clear" 'Compilethescriptinthefilelistedunder"fname"cellon themainform DSSText.Command ="compile"+fname 'TheCompilecommandsetsthecurrentdirectorythe thatofthefile 'Thats wherealltheresultfileswillendup. 'AssignavariabletotheCircuitinterfaceforeasieraccess SetDSSCircuit =DSSobj.ActiveCircuit EndSub This subroutine loads the circuit from the base script files using the Compile command through the Text interface. fname is a string contains the name of the master file. There is an active circuit now, so assign the DSSCircuit variable.

4th International Conference on Integration of Renewable and Distributed Energy Resources

124

VBAExample
PublicSubLoadSeqVoltages() 'ThisSubloadsthesequencevoltagesontoSheet1startinginRow2 DimDSSBus AsOpenDSSengine.Bus DimiRow AsLong,iCol AsLong,iAsLong,jAsLong DimVAsVariant DimWorkingSheet AsWorksheet SetWorkingSheet =Sheet1'settoSheet1(targetsheet) iRow =2 Fori=1ToDSSCircuit.NumBuses 'Cyclethroughallbuses SetDSSBus =DSSCircuit.Buses(i)'Setith busactive 'BusnamegoesintoColumn1 WorkingSheet.Cells(iRow,1).Value=DSSCircuit.ActiveBus.Name 'Loadsequencevoltagemagnitudesofactivebusintovariantarray V=DSSBus.SeqVoltages 'PutthevariantarrayvaluesintoCells 'UseLbound andUBound becauseyoudon'tknowtheactualrange iCol =2 Forj=LBound(V)ToUBound(V) WorkingSheet.Cells(iRow,iCol).Value =V(j) iCol =iCol +1 Nextj iRow =iRow +1 Nexti
4th EndSub International Conference on Integration of Renewable and Distributed Energy Resources

This Sub puts the sequence voltage onto a spreadsheet Define a variable for the Bus interface Define a variant to pick up the arrays Cycle through all the buses Get the bus name

Get the voltages into the variant array Put them on the spreadsheet

125

RunningOpenDSSFromMatlab
StartingtheDSS
%Start up the DSS [DSSStartOK, DSSObj, DSSText] = DSSStartup;

function [Start,Obj,Text] = DSSStartup % Function for starting up the DSS % %instantiate the DSS Object Obj = actxserver('OpenDSSEngine.DSS'); % %Start the DSS. %Matlab session Start = Obj.Start(0); Only needs to be executed the first time w/in a

% Define the text interface to return Text = Obj.Text;

4th International Conference on Integration of Renewable and Distributed Energy Resources

126

UsingtheDSSthroughtheDSSText Interface fromMatlab (harmonicsexample)


%Compile the DSS circuit script DSSText.Command = 'compile master.dss'; % get an interface to the active circuit called "DSSCircuit" DSSCircuit = DSSObj.ActiveCircuit; %Determine which connection type for the source and call %appropriate DSS file switch XFMRType case 1 DSSText.Command = 'redirect directconnectsource.DSS'; case 2 DSSText.Command = 'redirect deltadelta.DSS'; case 3 DSSText.Command = 'redirect deltawye.DSS'; otherwise disp('Unknown source Connection Type') end %Set the system frequency and vsource frequency for harmonic requested DSSText.Command = ['set frequency=(' num2str(Freq) ' 60 *)']; DSSText.Command = ['vsource.source.frequency=(' num2str(Freq) ' 60 *)'];

4th International Conference on Integration of Renewable and Distributed Energy Resources

127

UsingtheDSSthroughtheDSSText Interface fromMatlab (harmonicsexample)(contd)


% Vary the parameters according to a random distribution % If more parameters need to be varied, just add them to the below % list. Set ParamNum to total number of parameters varied %ParamNum used for sorting/plotting

ParamNum = 6;

for Case_Count = 1:Max_Cases %Create index in the OutputData matrix to keep the cases in order 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. ) %define a new line geometry with random spacing DSSText.Command = ['New LineGeometry.OHMOD nconds=3 nphases=3 cond=1 wire=acsr336 num2str(x1) ' ' num2str(y1) ' units=ft cond=2 wire=acsr336 x=' num2str(x2) ' num2str(y2) ' units=ft cond=3 wire=acsr336 x=' num2str(x3) ' ' num2str(y3) ' units=ft']; %Solve the circuit DSSText.Command = 'solve'; x=' '

(etc. etc.)
4th International Conference on Integration of Renewable and Distributed Energy Resources

128

PowerFlowSolutionBasics

4th International Conference on Integration of Renewable and Distributed Energy Resources

SolvingthePowerFlow
Oncethecircuitmodelisconnectedproperlythenextstepisto solve thebasepowerflow PowerConversionelements(PCelements)areoftennonlinear LoadareconvertedtoaNortonequivalentbasedonnominal 100%ratedvoltage.
Currentsourceiscompensationcurrent

Afixedpointsolutionalgorithmisemployedformostsolutions Thismethodallowsforflexibleloadmodelsandisfairlyrobust formostdistributionsystems

4th International Conference on Integration of Renewable and Distributed Energy Resources

130

SolvingthePowerFlow,contd
Thissolutionmethodrequiresthatthefirstguessatthevoltages beclosetothefinalsolution
Notaproblemfordailyoryearlysimulations Firstsolutionisoftenmostdifficult

ThesolutioninitializationroutineinOpenDSSaccomplishesthis inmostcases Methodworkswellforarbitraryunbalances Forconditionsthataresensitive,aNewtonmethodisprovided thatismorerobust,butslower.

4th International Conference on Integration of Renewable and Distributed Energy Resources

131

Load(aPCElement)
General Concept
Added into Injection Current Vector

Yprim
(One-Line Diagram)

Compensation Current

Goes into System Y Matrix

Most Power Conversion (PC) Elements are Modeled Like This

4th International Conference on Integration of Renewable and Distributed Energy Resources

132

Load 3phaseYconnected
Phase 1

Yprim
1 2 3

Compensation Current

Yprim

Compensation Current

Phase 2

4 Conductors/Terminal 4
4th International Conference on Integration of Renewable and Distributed Energy Resources

Yprim

Compensation Current

Phase 3

133

Load 3phaseDeltaconnected
Phase 1

Yprim
2

Compensation Current

Yprim
3

Compensation Current

Phase 2

3 Conductors/Terminal

Yprim

Compensation Current

Phase 3

4th International Conference on Integration of Renewable and Distributed Energy Resources

134

PuttingitAllTogether
ALL Elements Yprim 1 PC Elements Comp. Currents I1 I2 Yprim 2 Yprim 3 Yprim n

Iinj

Node Voltages

Im Iteration Loop
4th International Conference on Integration of Renewable and Distributed Energy Resources

135

PuttingitAllTogether
ALL Elements Yprim 1 PC Elements Comp. Currents I1 I2 Yprim 2 Yprim 3 Yprim n

Iinj

Node Voltages

Im Iteration Loop
4th International Conference on Integration of Renewable and Distributed Energy Resources

136

SolutionSpeed
Distributionsystemsgenerallyconvergeverywell
Manytransmissionsystems,also

TheOpenDSSprogramseemstobeonparwiththe fastercommercialprograms Solutionmethodisdesignedtorunannualsimulations Ourphilosophy:


Erronthesideofrunningmorepowerflowsimulations
Dontworryaboutthesolutiontimeuntilitprovestobeaproblem Thisrevealsmoreinformationabouttheproblem

4th International Conference on Integration of Renewable and Distributed Energy Resources

137

References
OpenDSSTechNotes: http://sourceforge.net/apps/mediawiki/electricdss/index.php?title=List_of_DSS_tech _notes OpenDSSForum: http://sourceforge.net/projects/electricdss/forums/forum/861976 FrequentlyAskedQuestions: http://www.rogerdugan.com/OpenDSS/sourceforgelinks.html MainDocumentationArea: http://electricdss.svn.sourceforge.net/viewvc/electricdss/Doc/

4th International Conference on Integration of Renewable and Distributed Energy Resources

138

Anda mungkin juga menyukai