/
GenerationAC3ph.mo
1325 lines (1284 loc) · 62.2 KB
/
GenerationAC3ph.mo
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
within PowerSystems.Examples.Spot;
package GenerationAC3ph "AC power generation, dq0"
extends Modelica.Icons.ExamplesPackage;
model Vsource "Power transfer from voltage source to slack bus"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.AC3ph.Sources.VsourceRX Vsource(
V_nom=20e3,
v_ini=1.02,
S_nom=500e6,
pq_ini={1,0.428},
alpha_ini=0.037545522868902)
annotation (Placement(transformation(extent={{-70,0},{-50,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{-30,0},{-10,20}})));
PowerSystems.AC3ph.Lines.RXline line(
len=40e3, par(V_nom=20e3, S_nom=500e6),
stIni_en=false)
annotation (Placement(transformation(extent={{10,0},{30,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{70,0},{50,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-70,0},{-90,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{70,0},{90,20}})));
equation
connect(Vsource.term, sensor.term_p) annotation (Line(points={{-50,10},{-30,
10}}, color={0,110,110}));
connect(sensor.term_n, line.term_p) annotation (Line(points={{-10,10},{10,
10}}, color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{30,10},{50,10}},
color={0,110,110}));
connect(grd1.term, Vsource.neutral)
annotation (Line(points={{-70,10},{-70,10}}, color={0,0,255}));
connect(infBus.neutral, grd2.term)
annotation (Line(points={{70,10},{70,10}}, color={0,0,255}));
annotation (
Documentation(
info="<html>
<p>Amplitude and phase of voltage are given in both nodes.<br>
The powerflow depends essentially on the phase difference between the nodes and also on the voltage amplitudes.</p>
<p><i>See for example:</i>
<pre>
sensor.p[1:2] active and reactive power
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>
"), experiment(StopTime=1));
end Vsource;
model PVsource "Power transfer from power-voltage source to slack bus"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.AC3ph.Sources.PVsource PVsource(
V_nom=20e3,
S_nom=500e6,
v0=1.02,
p0=1)
annotation (Placement(transformation(extent={{-70,0},{-50,20}})));
PowerSystems.AC3ph.Lines.RXline line(par(
V_nom=20e3,
S_nom=500e6),
len=40e3)
annotation (Placement(transformation(extent={{10,0},{30,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{-30,0},{-10,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{70,0},{50,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-70,0},{-90,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{70,0},{90,20}})));
equation
connect(PVsource.term, sensor.term_p) annotation (Line(points={{-50,10},{
-30,10}}, color={0,110,110}));
connect(sensor.term_n, line.term_p) annotation (Line(points={{-10,10},{10,
10}}, color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{30,10},{50,10}},
color={0,110,110}));
connect(grd1.term, PVsource.neutral)
annotation (Line(points={{-70,10},{-70,10}}, color={0,0,255}));
connect(infBus.neutral, grd2.term)
annotation (Line(points={{70,10},{70,10}}, color={0,0,255}));
annotation (
Documentation(
info="<html>
<p>Power and voltage-amplitude are given in the source node, whereas the slackBus is identical to the previous example.<br>
The active powerflow is now directly determined through a parameter instead of indirectly depending on the voltage phase-angle.</p>
<p><i>See for example:</i>
<pre>
sensor.p[1:2] active and reactive power
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>"),
experiment(StopTime=1));
end PVsource;
model PQsource "Power transfer from power source to slack bus"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.AC3ph.Sources.PQsource PQsource(
S_nom=500e6,
V_nom=20e3,
pq0={1,0.428})
annotation (Placement(transformation(extent={{-70,0},{-50,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{-30,0},{-10,20}})));
PowerSystems.AC3ph.Lines.RXline line(par(
V_nom=20e3,
S_nom=500e6),
len=40e3)
annotation (Placement(transformation(extent={{10,0},{30,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{70,0},{50,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-70,0},{-90,20}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{70,0},{90,20}})));
equation
connect(PQsource.term, sensor.term_p) annotation (Line(points={{-50,10},{
-30,10}}, color={0,110,110}));
connect(sensor.term_n, line.term_p) annotation (Line(points={{-10,10},{10,
10}}, color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{30,10},{50,10}},
color={0,110,110}));
connect(grd1.term, PQsource.neutral)
annotation (Line(points={{-70,10},{-70,10}}, color={0,0,255}));
connect(infBus.neutral, grd2.term)
annotation (Line(points={{70,10},{70,10}}, color={0,0,255}));
annotation (
Documentation(
info="<html>
<p>Active and reactive power are given in the source node, whereas the slackBus is identical to the previous example.<br>
Both active and reactive powerflow are now directly determined through a parameter.</p>
<p><i>See for example:</i>
<pre>
sensor.p[1:2] active and reactive power
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>"),
experiment(StopTime=1));
end PQsource;
model PowerAngle "Generator at fixed power angle"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},
{-80,100}})));
PowerSystems.AC3ph.Machines.Control.PowerAngle powerAngle(delta=
0.78539816339745)
annotation (Placement(transformation(extent={{-80,0},{-60,20}})));
PowerSystems.Control.Exciters.ExciterSimple exciter(v_f=2.258)
annotation (Placement(transformation(extent={{-30,70},{-50,90}})));
PowerSystems.AC3ph.Machines.Control.Excitation excitation(V_nom=20e3, Vf_nom=20e3)
annotation (Placement(
transformation(extent={{-30,40},{-50,60}})));
PowerSystems.AC3ph.Machines.Synchron3rd_ee generator(par=synData)
annotation (Placement(transformation(extent={{-30,0},{-50,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{0,0},{20,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{90,0},{70,20}})));
PowerSystems.AC3ph.Sources.Voltage Vgen1(
V_nom=20e3,
v0=2.258,
alpha0=0.78539816339745)
annotation (Placement(transformation(extent={{-80,-80},{-60,-60}})));
PowerSystems.AC3ph.Impedances.Inductor RLgen1(
V_nom=20e3,
S_nom=500e6,
r=0.01,
x_m=-0.5,
x_s=1.1)
annotation (Placement(transformation(extent={{-50,-80},{-30,-60}})));
PowerSystems.AC3ph.Sensors.Psensor sensor1
annotation (Placement(transformation(extent={{0,-80},{20,-60}})));
PowerSystems.AC3ph.Sources.Voltage Vbus1(V_nom=20e3)
annotation (Placement(transformation(extent={{90,-80},{70,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-80,-80},{-100,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{90,-80},{110,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd3
annotation (Placement(transformation(extent=
{{90,0},{110,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond(m=2)
annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
parameter PowerSystems.Examples.Spot.Data.Machines.SynchronIso20kV_500MVA synData
annotation (Placement(transformation(
extent={{40,80},{80,100}})));
equation
connect(Vgen1.term, RLgen1.term_p) annotation (Line(points={{-60,-70},{-50,
-70}}, color={0,110,110}));
connect(RLgen1.term_n, sensor1.term_p) annotation (Line(points={{-30,-70},{
0,-70}}, color={0,110,110}));
connect(sensor1.term_n, Vbus1.term) annotation (Line(points={{20,-70},{70,
-70}}, color={0,110,110}));
connect(exciter.fieldVoltage, excitation.fieldVoltage) annotation (Line(
points={{-46,70},{-46,60}}, color={0,0,127}));
connect(excitation.termVoltage, exciter.termVoltage) annotation (Line(
points={{-34,60},{-34,70}}, color={0,0,127}));
connect(generator.term, excitation.term)
annotation (Line(points={{-30,10},{-20,
10},{-20,50},{-30,50}}, color={0,110,110}));
connect(excitation.field, generator.field)
annotation (Line(points={{-30,46},{-24,46},{-24,6},{-30,6}}, color={0,0,
255}));
connect(generator.term, powerAngle.term)
annotation (Line(points={{-30,10},{-20,
10},{-20,-10},{-80,-10},{-80,10}}, color={0,110,110}));
connect(powerAngle.airgap, generator.airgap)
annotation (Line(points={{-60,16},{-40,16}}, color={0,0,0}));
connect(generator.term, sensor.term_p)
annotation (Line(points={{-30,10},{0,10}},
color={0,110,110}));
connect(sensor.term_n, infBus.term) annotation (Line(points={{20,10},{70,10}},
color={0,110,110}));
connect(grd1.term, Vgen1.neutral) annotation (Line(points={{-80,-70},{-80,
-70}}, color={0,0,255}));
connect(Vbus1.neutral, grd2.term)
annotation (Line(points={{90,-70},{90,-70}}, color={0,0,255}));
connect(infBus.neutral, grd3.term)
annotation (Line(points={{90,10},{90,10}}, color={0,0,255}));
connect(generator.heat, bdCond.heat) annotation (Line(points={{-40,20},{
-40,20}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>This example is a first step on the way 'from voltage source to generator model'.</p>
<p>Lower part of example (for comparison with and interpretation of upper part):<br>
simplest generator description as a \"voltage behind reactance\".</p>
<p>Upper part: 3-winding generator model, isotrope with x_d = x_q.<br>
The power-angle is artificially fixed. The correspondence is:
<pre>
V_gen1.alpha0 ~ powerAngle.delta
V_gen1.v0 ~ exciter.v_f
</pre></p>
<p>In both cases the terminal voltage is fixed by the bus voltage. The results should coincide.</p>
<p><i>See for example:</i>
<pre>
sensor.p[1:2] active and reactive power
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>"),
experiment(StopTime=1));
end PowerAngle;
model TurbineGenerator "Turbine with generator"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},
{-80,100}})));
parameter SIpu.AngularVelocity speed_ini(unit="1")=1 "initial speed";
PowerSystems.Mechanics.TurboGroups.SingleMassTG turboGrp(
final w_ini=speed_ini*2*pi*generator.par.f_nom/generator.par.pp,
H=20,
w_nom=2*pi*generator.par.f_nom,
P_nom=generator.par.S_nom)
annotation (Placement(transformation(extent={{-80,0},{
-60,20}})));
PowerSystems.AC3ph.Machines.Synchron3rd_ee generator(par=synData)
annotation (Placement(transformation(extent={{-30,0},{-50,20}})));
PowerSystems.Control.Governors.GovernorSimple governor(p=1.0116)
annotation (Placement(transformation(extent={{-80,30},{-60,50}})));
PowerSystems.Control.Exciters.ExciterSimple exciter(v_f=2.258)
annotation (Placement(transformation(extent={{-30,70},{-50,90}})));
PowerSystems.AC3ph.Machines.Control.Excitation excitation(V_nom=20e3, Vf_nom=20e3)
annotation (Placement(
transformation(extent={{-30,40},{-50,60}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{0,0},{20,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{90,0},{70,20}})));
PowerSystems.AC3ph.Sources.Voltage Vgen1(
V_nom=20e3,
v0=2.258,
alpha0=0.78539816339745)
annotation (Placement(transformation(extent={{-80,-80},{-60,-60}})));
PowerSystems.AC3ph.Impedances.Inductor RLgen1(
V_nom=20e3,
S_nom=500e6,
x_s=1.1,
x_m=-0.5,
r=0.01)
annotation (Placement(transformation(extent={{-50,-80},{-30,-60}})));
PowerSystems.AC3ph.Sensors.Psensor sensor1
annotation (Placement(transformation(extent={{0,-80},{20,-60}})));
PowerSystems.AC3ph.Sources.Voltage VBus1(V_nom=20e3)
annotation (Placement(transformation(extent={{90,-80},{70,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-80,-80},{-100,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{90,-80},{110,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd3
annotation (Placement(transformation(extent=
{{90,0},{110,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond(m=2)
annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
parameter PowerSystems.Examples.Spot.Data.Machines.SynchronIso20kV_500MVA synData
annotation (Placement(transformation(
extent={{40,80},{80,100}})));
equation
connect(Vgen1.term, RLgen1.term_p) annotation (Line(points={{-60,-70},{-50,
-70}}, color={0,110,110}));
connect(RLgen1.term_n, sensor1.term_p) annotation (Line(points={{-30,-70},{
0,-70}}, color={0,110,110}));
connect(sensor1.term_n, VBus1.term) annotation (Line(points={{20,-70},{70,
-70}}, color={0,110,110}));
connect(exciter.fieldVoltage, excitation.fieldVoltage) annotation (Line(
points={{-46,70},{-46,60}}, color={0,0,127}));
connect(excitation.termVoltage, exciter.termVoltage) annotation (Line(
points={{-34,60},{-34,70}}, color={0,0,127}));
connect(turboGrp.airgap, generator.airgap)
annotation (Line(points={{-60,16},{-40,16}}, color={0,0,0}));
connect(generator.term, excitation.term)
annotation (Line(points={{-30,10},{-20,
10},{-20,50},{-30,50}}, color={0,110,110}));
connect(excitation.field, generator.field)
annotation (Line(points={{-30,46},{-24,46},{-24,6},{-30,6}}, color={0,0,
255}));
connect(generator.term, sensor.term_p)
annotation (Line(points={{-30,10},{0,10}},
color={0,110,110}));
connect(sensor.term_n, infBus.term) annotation (Line(points={{20,10},{70,10}},
color={0,110,110}));
connect(turboGrp.speed, governor.speed) annotation (Line(points={{-76,20},{
-76,30}}, color={0,0,127}));
connect(governor.power, turboGrp.power) annotation (Line(points={{-64,30},{
-64,20}}, color={0,0,127}));
connect(grd1.term, Vgen1.neutral) annotation (Line(points={{-80,-70},{-80,
-70}}, color={0,0,255}));
connect(VBus1.neutral, grd2.term)
annotation (Line(points={{90,-70},{90,-70}}, color={0,0,255}));
connect(infBus.neutral, grd3.term)
annotation (Line(points={{90,10},{90,10}}, color={0,0,255}));
connect(generator.heat, bdCond.heat) annotation (Line(points={{-40,20},{
-40,20}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>Second example 'from voltage source to generator model' with additional turbine.</p>
<p>Lower part of example (for comparison with and interpretation of upper part):<br>
simplest generator description as a \"voltage behind reactance\".</p>
<p>Upper part: 3-winding generator model, isotrope with x_d = x_q.<br>
Instead of a fixed power-angle as in the previous example, a turbine delivers the appropriate power. The correspondence is still:
<pre>
V_gen1.alpha0 ~ generator.powerAngle (mod 2pi)
V_gen1.v0 ~ exciter.v_f
</pre></p>
<p>In both cases the terminal voltage is fixed by the bus voltage. The results should coincide.</p>
<p><i>See and compare for example:</i>
<pre>
sensor.p[1:2] active and reactive power
V_gen1.alpha0 with gen.powerAngle.
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>
"), experiment(StopTime=1));
end TurbineGenerator;
model TurbineGeneratorLine "Turbine with generator and line"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},
{-80,100}})));
parameter SIpu.AngularVelocity speed_ini(unit="1")=1 "initial speed";
PowerSystems.Mechanics.TurboGroups.SingleMassTG turboGrp(
final w_ini=speed_ini*2*pi*generator.par.f_nom/generator.par.pp,
H=20,
w_nom=2*pi*generator.par.f_nom,
P_nom=generator.par.S_nom)
annotation (Placement(transformation(extent={{-80,0},{
-60,20}})));
PowerSystems.AC3ph.Machines.Synchron3rd_ee generator(par=synData)
annotation (Placement(transformation(extent={{-30,0},{-50,20}})));
PowerSystems.Control.Governors.GovernorSimple governor(p=1.0094)
annotation (Placement(transformation(extent={{-80,30},{-60,50}})));
PowerSystems.Control.Exciters.ExciterSimple exciter(v_f=2.245)
annotation (Placement(transformation(extent={{-30,80},{-50,100}})));
PowerSystems.AC3ph.Machines.Control.Excitation excitation(V_nom=20e3, Vf_nom=20e3)
annotation (Placement(
transformation(extent={{-30,50},{-50,70}})));
PowerSystems.AC3ph.Nodes.BusBar busbar annotation (Placement(
transformation(extent={{-20,0},{0,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{0,0},{20,20}})));
PowerSystems.AC3ph.Lines.RXline line(
par(
V_nom=20e3,
r=0.02e-3,
x=0.2e-3),
stIni_en=false,
len=400e3)
annotation (Placement(transformation(extent={{30,0},{50,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{90,0},{70,20}})));
PowerSystems.AC3ph.Sources.Voltage Vgen1(
V_nom=20e3,
v0=2.245,
alpha0=1.0285225282003)
annotation (Placement(transformation(extent={{-80,-80},{-60,-60}})));
PowerSystems.AC3ph.Impedances.Inductor RLgen1(
V_nom=20e3,
S_nom=500e6,
x_s=1.1,
x_m=-0.5,
r=0.01)
annotation (Placement(transformation(extent={{-50,-80},{-30,-60}})));
PowerSystems.AC3ph.Nodes.BusBar busbar1 annotation (Placement(
transformation(extent={{-20,-80},{0,-60}})));
PowerSystems.AC3ph.Sensors.Psensor sensor1
annotation (Placement(transformation(extent={{0,-80},{20,-60}})));
PowerSystems.AC3ph.Lines.RXline line1(
par(
V_nom=20e3,
r=0.02e-3,
x=0.2e-3),
stIni_en=false,
len=400e3) annotation (Placement(transformation(
extent={{30,-80},{50,-60}})));
PowerSystems.AC3ph.Sources.Voltage VBus1(V_nom=20e3)
annotation (Placement(transformation(extent={{90,-80},{70,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-80,-80},{-100,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{90,-80},{110,-60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd3
annotation (Placement(transformation(extent=
{{90,0},{110,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond(m=2)
annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
parameter PowerSystems.Examples.Spot.Data.Machines.SynchronIso20kV_500MVA synData
annotation (Placement(transformation(
extent={{40,80},{80,100}})));
equation
connect(Vgen1.term, RLgen1.term_p) annotation (Line(points={{-60,-70},{-50,
-70}}, color={0,110,110}));
connect(RLgen1.term_n, busbar1.term)
annotation (Line(points={{-30,-70},{-10,
-70}}, color={0,110,110}));
connect(busbar1.term, sensor1.term_p)
annotation (Line(points={{-10,-70},{0,
-70}}, color={0,110,110}));
connect(sensor1.term_n, line1.term_p) annotation (Line(points={{20,-70},{30,
-70}}, color={0,110,110}));
connect(line1.term_n, VBus1.term) annotation (Line(points={{50,-70},{70,-70}},
color={0,110,110}));
connect(exciter.fieldVoltage, excitation.fieldVoltage) annotation (Line(
points={{-46,80},{-46,70}}, color={0,0,127}));
connect(excitation.termVoltage, exciter.termVoltage) annotation (Line(
points={{-34,70},{-34,80}}, color={0,0,127}));
connect(turboGrp.airgap, generator.airgap)
annotation (Line(points={{-60,16},{-40,16}}, color={0,0,0}));
connect(generator.term, excitation.term)
annotation (Line(points={{-30,10},{-20,
10},{-20,60},{-30,60}}, color={0,110,110}));
connect(excitation.field, generator.field)
annotation (Line(points={{-30,56},{-24,56},{-24,6},{-30,6}}, color={0,0,
255}));
connect(generator.term, busbar.term)
annotation (Line(points={{-30,10},{-10,10}},
color={0,110,110}));
connect(busbar.term, sensor.term_p)
annotation (Line(points={{-10,10},{0,10}},
color={0,110,110}));
connect(sensor.term_n, line.term_p) annotation (Line(points={{20,10},{30,10}},
color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{50,10},{70,10}},
color={0,110,110}));
connect(turboGrp.speed, governor.speed) annotation (Line(points={{-76,20},{
-76,30}}, color={0,0,127}));
connect(governor.power, turboGrp.power) annotation (Line(points={{-64,30},{
-64,20}}, color={0,0,127}));
connect(grd1.term, Vgen1.neutral) annotation (Line(points={{-80,-70},{-80,
-70}}, color={0,0,255}));
connect(VBus1.neutral, grd2.term)
annotation (Line(points={{90,-70},{90,-70}}, color={0,0,255}));
connect(infBus.neutral, grd3.term)
annotation (Line(points={{90,10},{90,10}}, color={0,0,255}));
connect(generator.heat, bdCond.heat) annotation (Line(points={{-40,20},{
-40,20}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>The third example is obtained from the previous by adding a line between generator and infinite bus.</p>
<p>The terminal voltage depends on the line-properties. Now the correspondence is:
<pre>
V_gen1.alpha0 - bus1.alpha_v ~ generator.powerAngle
V_gen1.v0 ~ exciter.v_f
</pre></p>
<p><i>See and compare for example:</i>
<pre>
sensor.p[1:2] active and reactive power
V_gen1.alpha0 and busbar1.alpha_v with gen.powerAngle.
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>
"), experiment(StopTime=1));
end TurbineGeneratorLine;
model TurboGeneratorLine "Turbo-generator with line to infinite bus"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen(
H=20,
generator(par=synData),
v_ini=1.12762,
p_ini=1,
q_ini=0.42729,
alpha_ini=0.346481,
redeclare Control.Exciters.ExciterConst exciter "constant")
annotation (Placement(transformation(extent={{-60,0},{-40,20}})));
PowerSystems.AC3ph.Nodes.BusBar busbar annotation (Placement(
transformation(extent={{-20,0},{0,20}})));
PowerSystems.AC3ph.Sensors.Psensor sensor
annotation (Placement(transformation(extent={{0,0},{20,20}})));
PowerSystems.AC3ph.Lines.RXline line(
par(
V_nom=20e3,
r=0.02e-3,
x=0.2e-3),
stIni_en=false,
len=400e3)
annotation (Placement(transformation(extent={{30,0},{50,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{90,0},{70,20}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts
annotation (Placement(transformation(
extent={{-80,0},{-60,20}})));
PowerSystems.AC3ph.Sources.Voltage Vgen1(
V_nom=20e3,
v0=2.245,
alpha0=1.0285225282003)
annotation (Placement(transformation(extent={{-80,-60},{-60,-40}})));
PowerSystems.AC3ph.Impedances.Inductor RLgen1(
V_nom=20e3,
S_nom=500e6,
x_s=1.1,
x_m=-0.5,
r=0.01)
annotation (Placement(transformation(extent={{-50,-60},{-30,-40}})));
PowerSystems.AC3ph.Nodes.BusBar busbar1 annotation (Placement(
transformation(extent={{-20,-60},{0,-40}})));
PowerSystems.AC3ph.Sensors.Psensor sensor1
annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
PowerSystems.AC3ph.Lines.RXline line1(
par(
V_nom=20e3,
r=0.02e-3,
x=0.2e-3),
stIni_en=false,
len=400e3) annotation (Placement(transformation(
extent={{30,-60},{50,-40}})));
PowerSystems.AC3ph.Sources.Voltage VBus1(V_nom=20e3)
annotation (Placement(transformation(extent={{90,-60},{70,-40}})));
parameter PowerSystems.Examples.Spot.Data.Machines.SynchronIso20kV_500MVA synData
annotation (Placement(transformation(
extent={{40,80},{80,100}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{-80,-60},{-100,-40}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{90,-60},{110,-40}})));
PowerSystems.AC3ph.Nodes.GroundOne grd annotation (Placement(transformation(
extent={{90,0},{110,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond(m=2)
annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
equation
connect(setpts.setpts, turboGen.setpts) annotation (Line(points={{-60,10},{
-60,10}}, color={0,0,127}));
connect(Vgen1.term, RLgen1.term_p) annotation (Line(points={{-60,-50},{-50,
-50}}, color={0,110,110}));
connect(RLgen1.term_n, busbar1.term) annotation (Line(points={{-30,-50},{-10,
-50}}, color={0,110,110}));
connect(busbar1.term, sensor1.term_p) annotation (Line(points={{-10,-50},{0,
-50}}, color={0,110,110}));
connect(sensor1.term_n, line1.term_p) annotation (Line(points={{20,-50},{30,
-50}}, color={0,110,110}));
connect(line1.term_n, VBus1.term) annotation (Line(points={{50,-50},{70,-50}},
color={0,110,110}));
connect(turboGen.term, busbar.term) annotation (Line(points={{-40,10},{-10,
10}}, color={0,110,110}));
connect(busbar.term, sensor.term_p) annotation (Line(points={{-10,10},{0,10}},
color={0,110,110}));
connect(sensor.term_n, line.term_p) annotation (Line(points={{20,10},{30,10}},
color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{50,10},{70,10}},
color={0,110,110}));
connect(grd1.term, Vgen1.neutral) annotation (Line(points={{-80,-50},{-80,-50}},
color={0,0,255}));
connect(VBus1.neutral, grd2.term)
annotation (Line(points={{90,-50},{90,-50}}, color={0,0,255}));
connect(infBus.neutral, grd.term)
annotation (Line(points={{90,10},{90,10}}, color={0,0,255}));
connect(turboGen.heat, bdCond.heat) annotation (Line(points={{-50,20},{-50,
20}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>This example is the last step on the way 'from voltage source to generator model'.</p>
<p>Turbine and generator are packed into one single model. The terminal voltage depends on the line-properties. The correspondence is:
<pre>
V_gen1.alpha0 - bus1.alpha_v ~ turboGen.generator.powerAngle
V_gen1.v0 ~ exciter.v_f
</pre></p>
<p><i>See and compare for example:</i>
<pre>
sensor.p[1:2] active and reactive power
V_gen1.alpha0 and busbar1.alpha_v with gen.powerAngle.
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>
"), experiment(StopTime=1));
end TurboGeneratorLine;
model GenOrder3and7 "Generator-models of different order"
inner PowerSystems.System system(f_nom=60)
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen1(
dispPA=true,
v_ini=1.03,
p_ini=0.97,
H=20,
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
redeclare PowerSystems.AC3ph.Machines.Synchron3rd_ee generator(par=
syn3rd60Hz26k_720M) "3rd order",
alpha_ini=0.5235987755983)
annotation (Placement(transformation(extent={{-80,40},{-60,60}})));
PowerSystems.AC3ph.Breakers.Switch switchGrd1(V_nom=26e3,I_nom=30e6)
annotation (Placement(transformation(extent={{-20,30},{0,10}})));
PowerSystems.AC3ph.Nodes.Ground grd1f
annotation (Placement(transformation(extent={{20,10},{40,30}})));
PowerSystems.AC3ph.Lines.RXline line1(par(
V_nom=26e3,
f_nom=60,
r=0.02e-3,
x=0.3e-3), len=250e3)
annotation (Placement(transformation(extent={{20,40},{40,60}})));
PowerSystems.AC3ph.Sources.InfBus infBus1(V_nom=26e3)
annotation (Placement(transformation(extent={{80,40},{60,60}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen2(
dispPA=true,
v_ini=1.03,
p_ini=0.97,
H=20,
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
redeclare PowerSystems.AC3ph.Machines.Synchron_ee generator(par=syn60Hz26k_720M)
"nth order",
alpha_ini=0.5235987755983)
annotation (Placement(transformation(extent={{-80,-60},{-60,-40}})));
PowerSystems.AC3ph.Breakers.Switch switchGrd2(V_nom=26e3,I_nom=30e6)
annotation (Placement(transformation(extent={{-20,-90},{0,-70}})));
PowerSystems.AC3ph.Nodes.Ground grd2f
annotation (Placement(transformation(extent={{20,-90},{40,-70}})));
PowerSystems.AC3ph.Lines.RXline line2(par(
V_nom=26e3,
f_nom=60,
r=0.02e-3,
x=0.3e-3), len=250e3)
annotation (Placement(transformation(extent={{20,-60},{40,-40}})));
PowerSystems.AC3ph.Sources.InfBus infBus2(V_nom=26e3)
annotation (Placement(transformation(extent={{80,-60},{60,-40}})));
PowerSystems.Control.Relays.SwitchRelay relayGrd(
ini_state=false,
t_switch={0.1,0.3})
annotation (Placement(transformation(extent={{20,-20},{0,0}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts1
annotation (Placement(transformation(
extent={{-100,40},{-80,60}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts2
annotation (Placement(transformation(
extent={{-100,-60},{-80,-40}})));
PowerSystems.AC3ph.Nodes.GroundOne grd2 annotation (Placement(transformation(
extent={{80,-60},{100,-40}})));
PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation (Placement(transformation(
extent={{80,40},{100,60}})));
PowerSystems.Common.Thermal.BdCondV bdCond1(m=2)
annotation (Placement(transformation(extent={{-80,60},{-60,80}})));
PowerSystems.Common.Thermal.BdCondV bdCond2(m=2)
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
parameter PowerSystems.Examples.Spot.Data.Machines.Synchron3rd_ee60Hz_26kV_720MVA syn3rd60Hz26k_720M
annotation (Placement(transformation(extent={{-40,80},{0,100}})));
parameter PowerSystems.Examples.Spot.Data.Machines.Synchron_ee60Hz_26kV_720MVA syn60Hz26k_720M
annotation (Placement(transformation(extent={{20,80},{60,100}})));
equation
connect(setpts1.setpts, turboGen1.setpts) annotation (Line(points={{-80,50},
{-80,50}}, color={0,0,127}));
connect(setpts2.setpts, turboGen2.setpts) annotation (Line(points={{-80,-50},
{-80,-50}}, color={0,0,127}));
connect(relayGrd.y, switchGrd1.control) annotation (Line(points={{0,-10},{-10,
-10},{-10,10}}, color={255,0,255}));
connect(relayGrd.y, switchGrd2.control) annotation (Line(points={{0,-10},{-10,
-10},{-10,-70}}, color={255,0,255}));
connect(turboGen1.term, line1.term_p) annotation (Line(points={{-60,50},{20,
50}}, color={0,110,110}));
connect(line1.term_n, infBus1.term) annotation (Line(points={{40,50},{60,50}},
color={0,110,110}));
connect(turboGen1.term, switchGrd1.term_p) annotation (Line(points={{-60,50},
{-40,50},{-40,20},{-20,20}}, color={0,110,110}));
connect(switchGrd1.term_n, grd1f.term)
annotation (Line(points={{0,20},{20,20}}, color={0,110,110}));
connect(turboGen2.term, line2.term_p) annotation (Line(points={{-60,-50},{
20,-50}}, color={0,110,110}));
connect(line2.term_n, infBus2.term) annotation (Line(points={{40,-50},{60,
-50}}, color={0,110,110}));
connect(turboGen2.term, switchGrd2.term_p) annotation (Line(points={{-60,
-50},{-40,-50},{-40,-80},{-20,-80}}, color={0,110,110}));
connect(switchGrd2.term_n, grd2f.term) annotation (Line(points={{0,-80},{20,
-80}}, color={0,110,110}));
connect(infBus1.neutral, grd1.term)
annotation (Line(points={{80,50},{80,50}}, color={0,0,255}));
connect(infBus2.neutral, grd2.term)
annotation (Line(points={{80,-50},{80,-50}}, color={0,0,255}));
connect(turboGen1.heat, bdCond1.heat) annotation (Line(points={{-70,60},{
-70,60}}, color={176,0,0}));
connect(turboGen2.heat, bdCond2.heat) annotation (Line(points={{-70,-40},{
-70,-40}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>The example illustrates the difference in dynamic behaviour between low- and high-order generator models.<br>
A common 3-phase short circuit occurs at 100 msec, cleared after 300 ms.</p>
<p><i>Compare for example:</i>
<pre>
.generator.i current
.generator.tau torque
</pre>
of <tt>turbGen1</tt> and <tt>turbGen2</tt>.<br>
The high order model exhibits fast damping of torque-oscillations due to the damper windings. See also damper currents i_rd, i_rq (protected).</p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>"),
experiment(StopTime=0.5, Interval=0.5e-3));
end GenOrder3and7;
model TurboGroupGenerator
"Turbogroup with generator, electro-mechanical interaction"
inner PowerSystems.System system
annotation (Placement(transformation(extent={{-100,80},{
-80,100}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts
annotation (Placement(transformation(
extent={{-100,0},{-80,20}})));
PowerSystems.AC3ph.Generation.TurboGrpGenerator turboGrpGen(
v_ini=1.0156,
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
turboGroup(par=turboGrp1200M),
redeclare PowerSystems.AC3ph.Machines.Synchron_ee generator(par=syn20k_1200M)
"nth order")
annotation (Placement(transformation(extent={{-80,0},{-60,20}})));
PowerSystems.AC3ph.Lines.RXline line(
len=40e3, par(
V_nom=20e3,
r=0.02e-3,
x=0.2e-3))
annotation (Placement(transformation(extent={{20,0},{40,20}})));
PowerSystems.AC3ph.Sources.InfBus infBus(V_nom=20e3)
annotation (Placement(transformation(extent={{80,0},{60,20}})));
PowerSystems.AC3ph.Breakers.ForcedSwitch switchGrd(V_nom=20e3,I_nom=60e3)
annotation (Placement(transformation(extent={{-20,-30},{0,-10}})));
PowerSystems.AC3ph.Nodes.Ground grdf
annotation (Placement(transformation(extent={{20,-30},{40,-10}})));
PowerSystems.Control.Relays.SwitchRelay relayGrd(
ini_state=false,
t_switch={0.1,0.3},
n=1) annotation (Placement(transformation(extent={{40,40},{20,60}})));
PowerSystems.AC3ph.Nodes.GroundOne grd annotation (Placement(transformation(
extent={{80,0},{100,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond(m=2)
annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
parameter PowerSystems.Examples.Spot.Data.Machines.Synchron_ee20kV_1200MVA syn20k_1200M
annotation (Placement(transformation(extent={{20,80},{60,100}})));
parameter PowerSystems.Examples.Spot.Data.Turbines.SteamTurboGroup1200MW turboGrp1200M
annotation (Placement(transformation(extent={{-40,80},{0,100}})));
equation
connect(setpts.setpts, turboGrpGen.setpts) annotation (Line(points={{-80,10},
{-80,10}}, color={0,0,127}));
connect(relayGrd.y[1], switchGrd.control[1]) annotation (Line(points={{20,
50},{-10,50},{-10,-10}}, color={255,0,255}));
connect(turboGrpGen.term, line.term_p) annotation (Line(points={{-60,10},{
20,10}}, color={0,110,110}));
connect(line.term_n, infBus.term) annotation (Line(points={{40,10},{60,10}},
color={0,110,110}));
connect(turboGrpGen.term, switchGrd.term_p) annotation (Line(points={{-60,
10},{-40,10},{-40,-20},{-20,-20}}, color={0,110,110}));
connect(switchGrd.term_n, grdf.term) annotation (Line(points={{0,-20},{20,
-20}}, color={0,110,110}));
connect(infBus.neutral, grd.term)
annotation (Line(points={{80,10},{80,10}}, color={0,0,255}));
connect(turboGrpGen.heat, bdCond.heat) annotation (Line(points={{-70,20},{
-70,20}}, color={176,0,0}));
annotation (
Documentation(
info="<html>
<p>The example illustrates the influence of an electric shock on the mechanical behaviour of the turbogroup.<br>
A common 3-phase short circuit occurs at 0.1 sec, cleared after 200 ms.</p>
<p><i>See for example:</i>
<pre>
turboGrpGen.generator.tau torque (electric frequency)
turboGrpGen.turboGroup.delta relative angles between single turbines (frequencies typical 16 to 23 Hz)
</pre></p>
<p><a href=\"modelica://PowerSystems.Examples.Spot.GenerationAC3ph\">up users guide</a></p>
</html>"),
experiment(
StopTime=0.5,
Interval=0.5e-3));
end TurboGroupGenerator;
model TieLine "Generators and power-oscillations"
inner PowerSystems.System system(f_nom=60, fType_par=false,
f_lim={55,65})
annotation (Placement(transformation(extent={{-100,80},{-80,100}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen1(
dispPA=true,
alpha_ini=0.316177 + system.alpha0,
v_ini=1.05,
H=20,
redeclare PowerSystems.AC3ph.Machines.Synchron_ee generator(par=syn60Hz26k_720M)
"nth order",
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
redeclare PowerSystems.Control.Governors.Governor1st governor "1st order",
p_ini=0.9,
q_ini=0.24022361,
iniType=PowerSystems.Basic.Types.IniType.p_q)
annotation (Placement(transformation(extent={{-100,-20},{-80,0}})));
PowerSystems.AC3ph.Nodes.BusBar bus1 annotation (Placement(
transformation(extent={{-80,-20},{-60,0}})));
PowerSystems.AC3ph.Sensors.Psensor sensor1(term_p(v(start={20e3,0,0})))
annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
PowerSystems.AC3ph.Lines.RXline line1(par(
V_nom=26e3,
f_nom=60,
r=0.02e-3,
x=0.3e-3), len=200e3,
stIni_en=false)
annotation (Placement(transformation(extent={{-30,-20},{-10,0}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen2(
dispPA=true,
alpha_ini=0.0144536 + system.alpha0,
v_ini=1.04,
H=20,
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
redeclare PowerSystems.AC3ph.Machines.Synchron_ee generator(par=syn60Hz26k_720M)
"nth order",
redeclare PowerSystems.Control.Governors.Governor1st governor "1st order",
p_ini=0.9,
q_ini=0.5092972,
iniType=PowerSystems.Basic.Types.IniType.p_q)
annotation (Placement(transformation(extent={{100,-20},{80,0}})));
PowerSystems.AC3ph.Nodes.BusBar bus2 annotation (Placement(
transformation(extent={{60,-20},{80,0}})));
PowerSystems.AC3ph.Sensors.Psensor sensor2(term_p(v(start={20e3,0,0})))
annotation (Placement(transformation(extent={{60,-20},{40,0}})));
PowerSystems.AC3ph.Lines.RXline line2(par(
V_nom=26e3,
f_nom=60,
r=0.02e-3,
x=0.3e-3), len=40e3,
stIni_en=false)
annotation (Placement(transformation(extent={{10,-20},{30,0}})));
PowerSystems.AC3ph.Generation.TurboGenerator turboGen3(
dispPA=true,
v_ini=1.03,
H=20,
redeclare PowerSystems.Control.Exciters.Exciter1st exciter "1st order",
redeclare PowerSystems.Control.Governors.Governor1st governor "1st order",
redeclare PowerSystems.AC3ph.Machines.Synchron_ee generator(par=syn60Hz26k_720M,
stIni_en=false) "nth order",
q_ini=0.10292306,
p_ini=0.27353)
annotation (Placement(transformation(
origin={0,70},
extent={{-10,10},{10,-10}},
rotation=270)));
PowerSystems.AC3ph.Sensors.Psensor sensor3(term_p(v(start={20e3,0,0})))
annotation (Placement(transformation(
origin={0,40},
extent={{10,-10},{-10,10}},
rotation=90)));
PowerSystems.AC3ph.Lines.RXline line3(par(
V_nom=26e3,
f_nom=60,
r=0.02e-3,
x=0.3e-3), len=150e3,
stIni_en=false)
annotation (Placement(transformation(
origin={0,10},
extent={{-10,-10},{10,10}},
rotation=90)));
PowerSystems.AC3ph.Sensors.Psensor sensorLoad
annotation (Placement(transformation(
origin={0,-50},
extent={{10,-10},{-10,10}},
rotation=90)));
PowerSystems.AC3ph.Loads.Zload load(
p0_set={0.95,0.2},
V_nom=26e3,
S_nom=1500e6,
scType_par=false)
annotation (Placement(transformation(
origin={0,-90},
extent={{-10,10},{10,-10}},
rotation=270)));
PowerSystems.Blocks.Signals.Transient[2] pq_change(
each t_duration=0.1,
s_ini={0.95,0.2},
s_fin={0.2,0.1},
each t_change=2)
annotation (Placement(transformation(extent={{-40,-100},{-20,-80}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts1
annotation (Placement(transformation(
extent={{-120,-20},{-100,0}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts2
annotation (Placement(transformation(
extent={{120,-20},{100,0}})));
PowerSystems.Control.Setpoints.Set_w_p_v setpts3
annotation (Placement(transformation(
origin={0,90},
extent={{-10,10},{10,-10}},
rotation=270)));
PowerSystems.Common.Thermal.BdCondV bdCond1(m=2)
annotation (Placement(transformation(extent={{-100,0},{-80,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond2(m=2)
annotation (Placement(transformation(extent={{80,0},{100,20}})));
PowerSystems.Common.Thermal.BdCondV bdCond3(m=2)
annotation (Placement(transformation(
origin={-20,70},
extent={{-10,-10},{10,10}},
rotation=90)));
parameter PowerSystems.Examples.Spot.Data.Machines.Synchron_ee60Hz_26kV_720MVA syn60Hz26k_720M
annotation (Placement(transformation(extent={{-60,80},{-20,100}})));
equation
connect(pq_change.y,load. p_set) annotation (Line(points={{-20,-90},{-10,
-90}}, color={0,0,127}));
connect(setpts1.setpts,turboGen1. setpts) annotation (Line(points={{-100,
-10},{-100,-10}}, color={0,0,127}));
connect(setpts2.setpts,turboGen2. setpts) annotation (Line(points={{100,-10},
{100,-10}}, color={0,0,127}));
connect(sensorLoad.term_p,line3. term_p) annotation (Line(points={{
-6.12303e-016,-40},{-6.12303e-016,-30},{-6.12303e-016,-30},{
-6.12303e-016,-20},{-6.12303e-016,0},{-6.12303e-016,0}}, color={0,
110,110}));
connect(sensorLoad.term_n,load. term) annotation (Line(points={{
6.12303e-016,-60},{1.76911e-022,-70},{6.12303e-016,-70},{
6.12303e-016,-80}}, color={0,110,110}));
connect(turboGen1.term,bus1. term) annotation (Line(points={{-80,-10},{-70,
-10}}, color={0,110,110}));
connect(bus1.term,sensor1. term_p) annotation (Line(points={{-70,-10},{-60,
-10}}, color={0,110,110}));
connect(sensor1.term_n,line1. term_p) annotation (Line(points={{-40,-10},{
-30,-10}}, color={0,110,110}));
connect(turboGen2.term,bus2. term) annotation (Line(points={{80,-10},{70,-10}},
color={0,110,110}));
connect(bus2.term,sensor2. term_p) annotation (Line(points={{70,-10},{60,-10}},
color={0,110,110}));
connect(sensor2.term_n,line2. term_n) annotation (Line(points={{40,-10},{30,
-10}}, color={0,110,110}));
connect(line1.term_n,sensorLoad. term_p) annotation (Line(points={{-10,-10},
{-6,-10},{-6,-40},{-6.12303e-016,-40}}, color={0,110,110}));
connect(line2.term_p,sensorLoad. term_p) annotation (Line(points={{10,-10},
{6,-10},{6,-40},{-6.12303e-016,-40}}, color={0,110,110}));
connect(setpts3.setpts,turboGen3. setpts) annotation (Line(points={{
-6.12303e-016,80},{6.12303e-016,80}}, color={0,0,127}));
connect(turboGen3.term, sensor3.term_p) annotation (Line(points={{
-6.12303e-016,60},{-1.76911e-022,56},{-6.12303e-016,56},{
-6.12303e-016,50}}, color={0,120,120}));
connect(sensor3.term_n, line3.term_n) annotation (Line(points={{
6.12303e-016,30},{6.12303e-016,27.5},{6.12303e-016,27.5},{
6.12303e-016,25},{6.12303e-016,20},{6.12303e-016,20}}, color={0,120,
120}));
connect(turboGen1.heat, bdCond1.heat)
annotation (Line(points={{-90,0},{-90,0}}, color={176,0,0}));
connect(turboGen2.heat, bdCond2.heat)
annotation (Line(points={{90,0},{90,0}}, color={176,0,0}));
connect(turboGen3.heat, bdCond3.heat) annotation (Line(points={{-10,70},{
-10,70}}, color={176,0,0}));
annotation (
Documentation(
info="<html>