Skip to content

Commit 76ac642

Browse files
committed
Add-on PV Array Power Block
New add-on features for the PV model. 1) New package named AddOnBlocks in Renewables>PSSE 2) New model named IrradianceToPower.
1 parent 3902890 commit 76ac642

3 files changed

Lines changed: 115 additions & 23 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
within OpenIPSL.Electrical.Renewables.PSSE;
2+
package AddOnBlocks
3+
"This package contains additional add ons that can be added to the original renewable models."
4+
model IrradianceToPower "PV Array Power Output from Irradiance."
5+
6+
parameter Modelica.Units.SI.ActivePower Ypv = 1000 "Rated capacity of the PV array";
7+
parameter Modelica.Units.SI.Temperature Tcstc = 25 "PV cell temperature under standard test conditions";
8+
parameter Real fpv = 0.9 "PV derating factor";
9+
parameter Real ap = -0.48 "Temperature coefficient of power";
10+
parameter Modelica.Units.SI.RadiantEnergyFluenceRate Gtstc = 1000;
11+
12+
13+
14+
15+
Modelica.Blocks.Interfaces.RealOutput Ppv
16+
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
17+
Modelica.Blocks.Sources.CombiTimeTable SolarRadiation
18+
annotation (Placement(transformation(extent={{-80,40},{-60,60}})));
19+
Modelica.Blocks.Sources.CombiTimeTable SolarArrayTemperature
20+
annotation (Placement(transformation(extent={{-80,-60},{-60,-40}})));
21+
22+
23+
24+
25+
equation
26+
27+
Ppv = Ypv*fpv*(SolarRadiation.y[1]/Gtstc)*(1 + ap*(SolarArrayTemperature.y[1] - Tcstc));
28+
29+
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
30+
Rectangle(extent={{-100,100},{100,-100}}, lineColor={28,108,200}),
31+
Polygon(
32+
points={{-100,-60},{-60,-100},{-100,-100},{-100,-60}},
33+
lineColor={0,0,0},
34+
fillColor={255,170,85},
35+
fillPattern=FillPattern.Solid),
36+
Polygon(
37+
points={{-100,-20},{-20,-100},{-60,-100},{-100,-60},{-100,-20}},
38+
lineColor={0,0,0},
39+
fillColor={255,255,170},
40+
fillPattern=FillPattern.Solid),
41+
Polygon(
42+
points={{-100,20},{20,-100},{-20,-100},{-100,-20},{-100,20}},
43+
lineColor={0,0,0},
44+
fillColor={255,170,85},
45+
fillPattern=FillPattern.Solid),
46+
Polygon(
47+
points={{-100,60},{60,-100},{20,-100},{-100,20},{-100,60}},
48+
lineColor={0,0,0},
49+
fillColor={255,255,170},
50+
fillPattern=FillPattern.Solid),
51+
Polygon(
52+
points={{-100,100},{100,-100},{60,-100},{-100,60},{-100,100}},
53+
lineColor={0,0,0},
54+
fillColor={255,170,85},
55+
fillPattern=FillPattern.Solid),
56+
Polygon(
57+
points={{-100,100},{100,-100},{100,-60},{-60,100},{-100,100}},
58+
lineColor={0,0,0},
59+
fillColor={255,255,170},
60+
fillPattern=FillPattern.Solid),
61+
Polygon(
62+
points={{-20,100},{100,-20},{100,-60},{-60,100},{-20,100}},
63+
lineColor={0,0,0},
64+
fillColor={255,170,85},
65+
fillPattern=FillPattern.Solid),
66+
Polygon(
67+
points={{-20,100},{100,-20},{100,20},{20,100},{-20,100}},
68+
lineColor={0,0,0},
69+
fillColor={255,255,170},
70+
fillPattern=FillPattern.Solid),
71+
Polygon(
72+
points={{60,100},{100,60},{100,20},{20,100},{60,100}},
73+
lineColor={0,0,0},
74+
fillColor={255,170,85},
75+
fillPattern=FillPattern.Solid),
76+
Polygon(
77+
points={{60,100},{100,60},{100,60},{100,100},{60,100}},
78+
lineColor={0,0,0},
79+
fillColor={255,255,170},
80+
fillPattern=FillPattern.Solid),
81+
Text(
82+
extent={{-80,80},{80,-80}},
83+
textColor={0,0,255},
84+
textString="Irradiance
85+
to
86+
Power")}), Diagram(coordinateSystem(preserveAspectRatio=false)));
87+
end IrradianceToPower;
88+
end AddOnBlocks;

OpenIPSL/Electrical/Renewables/PSSE/BESS.mo

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ protected
102102
parameter Boolean fflag = (if PFunctionality == 1 then true else false);
103103
equation
104104
connect(RenewableController.Ipcmd, RenewableGenerator.Ipcmd)
105-
annotation (Line(points={{20.6667,-11.4667},{24,-11.4667},{24,-11.4286},{27.1429,-11.4286}},
106-
color={0,0,127}));
105+
annotation (Line(points={{20.6667,-11.3333},{24,-11.3333},{24,-11.4286},{
106+
27.1429,-11.4286}}, color={0,0,127}));
107107
connect(RenewableController.Iqcmd, RenewableGenerator.Iqcmd)
108-
annotation (Line(points={{20.6667,11.4667},{24,11.4667},{24,11.4286},{27.1429,11.4286}},
109-
color={0,0,127}));
108+
annotation (Line(points={{20.6667,11.3333},{24,11.3333},{24,11.4286},{
109+
27.1429,11.4286}}, color={0,0,127}));
110110
connect(RenewableGenerator.IQ0, RenewableController.iq0) annotation (Line(
111111
points={{32.8571,-21.4286},{32.8571,-28},{16,-28},{16,-21.3333}},
112112
color={0,0,127}));
@@ -129,43 +129,46 @@ equation
129129
points={{50,21.4286},{50,30},{-28,30},{-28,10.6667},{-21.3333,10.6667}},
130130
color={0,0,127}));
131131
connect(RenewableGenerator.Qgen, RenewableController.Qgen) annotation (Line(
132-
points={{61.4286,21.4286},{61.4286,34},{-30,34},{-30,5.33333},{-21.3333,5.33333}},
132+
points={{61.4286,21.4286},{61.4286,34},{-30,34},{-30,5.33333},{-21.3333,
133+
5.33333}},
133134
color={0,0,127}));
134135
connect(PlantController.Qext, RenewableController.Qext) annotation (Line(
135136
points={{-37,10},{-32,10},{-32,0},{-21.3333,0}}, color={0,
136137
0,127}));
137138
connect(PlantController.Pref, RenewableController.Pref) annotation (Line(
138-
points={{-37,-10},{-34,-10},{-34,-6},{-24,-6},{-24,-5.33333},{-21.3333,-5.33333}},
139-
color={
139+
points={{-37,-10},{-34,-10},{-34,-6},{-24,-6},{-24,-5.33333},{-21.3333,
140+
-5.33333}}, color={
140141
0,0,127}));
141-
connect(PlantController.p0, RenewableController.p0) annotation (Line(points={{-70,-22},{-70,-44},{-16,-44},{-16,-21.3333}},
142-
color={0,0,127}));
143-
connect(PlantController.v0, RenewableController.v0) annotation (Line(points={{-58,-22},{-58,-36},{0,-36},{0,-21.3333}},
144-
color={0,0,127}));
145-
connect(PlantController.q0, RenewableController.q0) annotation (Line(points={{-46,-22},{-46,-40},{-8,-40},{-8,-21.3333}},
146-
color={0,0,127}));
147-
connect(gain.u, RenewableGenerator.p_0) annotation (Line(points={{1.2,-60},{67.1429,-60},{67.1429,-21.4286}},
142+
connect(PlantController.p0, RenewableController.p0) annotation (Line(points={{-70,-22},
143+
{-70,-44},{-16,-44},{-16,-21.3333}}, color={0,0,127}));
144+
connect(PlantController.v0, RenewableController.v0) annotation (Line(points={{-58,-22},
145+
{-58,-36},{0,-36},{0,-21.3333}}, color={0,0,127}));
146+
connect(PlantController.q0, RenewableController.q0) annotation (Line(points={{-46,-22},
147+
{-46,-40},{-8,-40},{-8,-21.3333}}, color={0,0,127}));
148+
connect(gain.u, RenewableGenerator.p_0) annotation (Line(points={{1.2,-60},{
149+
67.1429,-60},{67.1429,-21.4286}},
148150
color={0,0,127}));
149-
connect(gain1.y, RenewableController.Qext) annotation (Line(points={{-12.6,-80},{-32,-80},{-32,0},{-21.3333,0}},
150-
color={0,0,127}));
151-
connect(gain.y, RenewableController.Pref) annotation (Line(points={{-12.6,-60},{-30,-60},{-30,-5.33333},{-21.3333,-5.33333}},
152-
color={0,0,127}));
153-
connect(gain1.u, RenewableGenerator.q_0) annotation (Line(points={{1.2,-80},{58.5714,-80},{58.5714,-21.4286}},
151+
connect(gain1.y, RenewableController.Qext) annotation (Line(points={{-12.6,
152+
-80},{-32,-80},{-32,0},{-21.3333,0}}, color={0,0,127}));
153+
connect(gain.y, RenewableController.Pref) annotation (Line(points={{-12.6,-60},
154+
{-30,-60},{-30,-5.33333},{-21.3333,-5.33333}}, color={0,0,127}));
155+
connect(gain1.u, RenewableGenerator.q_0) annotation (Line(points={{1.2,-80},{
156+
58.5714,-80},{58.5714,-21.4286}},
154157
color={0,0,127}));
155158
connect(freq_ref.y, PlantController.Freq_ref) annotation (Line(points={{-80.5,
156159
-55},{-88,-55},{-88,-12},{-80,-12}}, color={0,0,127}));
157160
connect(PlantController.Plant_pref, RenewableGenerator.p_0) annotation (Line(
158161
points={{-80,4},{-96,4},{-96,-92},{67.1429,-92},{67.1429,-21.4286}},
159162
color={0,0,127}));
160-
connect(PlantController.Qref, RenewableGenerator.q_0) annotation (Line(points={{-80,12},{-98,12},{-98,-98},{58.5714,-98},{58.5714,-21.4286}},
161-
color={
163+
connect(PlantController.Qref, RenewableGenerator.q_0) annotation (Line(points={{-80,12},
164+
{-98,12},{-98,-98},{58.5714,-98},{58.5714,-21.4286}}, color={
162165
0,0,127}));
163166
connect(RenewableGenerator.p, pwPin)
164167
annotation (Line(points={{70,0},{100,0}}, color={0,0,255}));
165168
connect(PlantController.Freq, FREQ) annotation (Line(points={{-80,-4},{-92,-4},{-92,0},{-120,0}},
166169
color={0,0,127}));
167-
connect(PAUX.y, RenewableController.Paux) annotation (Line(points={{-69.5,-75},{-26,-75},{-26,-10.6667},{-21.3333,-10.6667}},
168-
color={0,0,127}));
170+
connect(PAUX.y, RenewableController.Paux) annotation (Line(points={{-69.5,-75},
171+
{-26,-75},{-26,-10.6667},{-21.3333,-10.6667}}, color={0,0,127}));
169172
connect(PlantController.branch_ii, branch_ii) annotation (Line(points={{-62,22},{-62,96},{-40,96},{-40,120}},
170173
color={0,0,127}));
171174
connect(PlantController.branch_ir, branch_ir) annotation (Line(points={{-72,22},{-72,96},{-80,96},{-80,120}},

OpenIPSL/Electrical/Renewables/PSSE/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
BESS
22
PV
33
Wind
4+
AddOnBlocks
45
ElectricalController
56
InverterInterface
67
PlantController

0 commit comments

Comments
 (0)