-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dynamic_Kundur.dss
112 lines (88 loc) · 3.25 KB
/
Dynamic_Kundur.dss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Master for Simple Demo from Kundur's book pg.843 Example 13.1 //
// GIVEN PARAMETERS
//
// System Base: Vbase=24kV Sbase=2200MVA
//
// Generator: Rating=2200MVA kV=24 Xdp=0.3 H=3.5 MWs/MVA Damping Coefficient (Kd) = 0
// Initial Generator Conditions: Vpu=1.0 Vangle=28.34 P=0.9 Q=0.436 (overexcited)
//
// Initial SourceBus Conditions: Vpu=0.90081 Vangle=0
//
// Step-Up Transformer: Xt=j0.15pu
//
// Parallel Lines from transformer to SourceBus
// Circuit 1: Xpu = j0.5
// Circuit 2: Xpu = j0.93
//
// Scenario: 3-phase bolted fault to ground located on Circuit 2 near transformer terminal at t=1s and cleared at tc=0.07s by opening Circuit 2
Clearall
// Set the base frequency to 60Hz
Set DefaultBaseFrequency=60
Var @Zbase=53.615
// quasi-ideal source for inf. bus at SourceBus with initial conditions Vpu=0.90081 and Vangle = 0
New Circuit.SimpleDemo
~ BasekV=345 pu=0.90081 phases=3
~ Angle = 0.0 Model=ideal puZideal=[ 1.0e-7, 0.00001] BaseMVA=2220
// New parallel lines from SourceBus to high side of transformer
New Line.Source_HT_1 Bus1=SourceBus Bus2=HT R1=0 X1=(0.5 @Zbase *) R0=0 X0=(0.5 @Zbase *) C1=0 C0=0 length=1 Units=mi
New Line.Source_HT_2 Bus1=SourceBus Bus2=HT R1=0 X1=(0.93 @Zbase *) R0=0 X0=(0.93 @Zbase *) C1=0 C0=0 length=1 Units=mi
// New Transformer with reactance j0.15
New Transformer.Step_Up Phases=3 Windings=2 XHL=15 ppm=0
~ buses=(HT LT) conns='wye wye' kvs="345 24" kvas="2220000 2220000" %Loadloss=0
// Constant kW at specified power factor
// Define X/R very high so that R will be small
// Corrected MVA from 2200 to 2220
New Generator.G1 Bus1=LT kV=24 kW=(2220000 0.9 *) kvar=(2220000 0.436 *) Model=1 vminpu= 0.80 Vmaxpu=1.4 MVA=2220 XRdp=1e12 Xdp=0.3 Xdpp=0.25 H=3.5 D=0
// Set all voltage bases in model
set voltagebases=[345, 24]
calcv
// solve the steady-state solution
solve
//Monitor the generator and electrical lines
New Monitor.G1 Generator.G1 Term=1 mode=1 ppolar=no
New Monitor.G1seq Generator.G1 Term=1 mode=(1 16 +) ppolar=no
New Monitor.G1seqVI Generator.G1 Term=1 mode=(0 16 +)
New monitor.G1VI Generator.G1 Term=1 Mode=0
New Monitor.G1vars Generator.G1 Term=1 mode=3
New Monitor.Line1 Line.Source_HT_1 1 mode=0
New Monitor.Line2 Line.Source_HT_2 2 mode=0
// Switch to dynamics and run a few steps (1000ms)
solve mode=dynamic h=0.001 number=1
Solve number=1000
// optional debugs
// Fileedit DSSDLLDebug.txt ! if debugs in code activated
//
// Dump Vsource.source debug
//
// Solve mode=fault
// Show fault
//
// show Monitor G1
// show Monitor G1VI
// Show Monitor G1Seq
// Show Monitor G1SeqVI
// Show Mon G1vars
// Add the fault to bus HTand run 70 ms
New fault.F1 phases=3 Bus1=HT
Solve number=70
// Clear fault by opening Circuit 2
Disable Fault.F1
Open Line.Source_HT_2
// Run simulation out to 10000 ms
Solve Number=10000
// Show mon G1
// Show mon G1vars
Export monitors g1vars
Plot monitor object= g1vars channels=(2 ) ! generator angle
// ****** optional reports
// show V ln Nodes
// show powers mva elem
// Export mon G1
// Export monitors g1vars
// Export monitors Line1
// Export monitors Line2
// Plot monitor object=g1 channels=(1 )
// Plot monitor object= g1vars channels=(2 )
// Plot monitor object= g1vars channels=(1 )
// Plot monitor object= Line1 channels=(1 )
// Plot monitor object= Line2 channels=(1 )