/
PVArrayVerification.mo
75 lines (70 loc) · 3 KB
/
PVArrayVerification.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
within PVSystems.Examples.Verification;
model PVArrayVerification "PVArray verification"
extends Modelica.Icons.Example;
Modelica.Electrical.Analog.Sources.RampVoltage rampVoltage(
duration=1,
V=45,
offset=-10) annotation (Placement(transformation(
origin={40,10},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(
transformation(extent={{30,-40},{50,-20}}, rotation=0)));
Electrical.PVArray pVArray annotation (Placement(transformation(
origin={0,10},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Blocks.Sources.Constant Gn(k=1000) annotation (Placement(
transformation(extent={{-50,10},{-30,30}}, rotation=0)));
Modelica.Blocks.Sources.Constant Tn(k=298.15) annotation (Placement(
transformation(extent={{-50,-24},{-30,-4}}, rotation=0)));
equation
connect(Gn.y, pVArray.G) annotation (Line(points={{-29,20},{-16,20},{-16,13},
{-5.5,13}}, color={0,0,127}));
connect(Tn.y, pVArray.T) annotation (Line(points={{-29,-14},{-16,-14},{-16,7},
{-5.5,7}}, color={0,0,127}));
connect(pVArray.p, rampVoltage.p)
annotation (Line(points={{1.83691e-015,20},{40,20}}, color={0,0,255}));
connect(pVArray.n, rampVoltage.n)
annotation (Line(points={{-1.83691e-015,0},{40,0}}, color={0,0,255}));
connect(ground.p, rampVoltage.n)
annotation (Line(points={{40,-20},{40,0}}, color={0,0,255}));
annotation (
Diagram(graphics={Rectangle(extent={{-60,40},{60,-40}}, lineColor={255,255,
255})}),
Documentation(info="<html>
<p>
A ramp DC voltage source is applied in parallel to an
instance of the PVArray model. The voltage ramp is
configured to sweep from -10 volts to 35 volts in 1
second. This provides the enough voltage range to cover
all of the PV array's working range when initialized
with default values.
</p>
<p>
To use the example, simulate the model and start by
displaying both voltage and current of the ramp voltage
source. A figure like the following should be displayed:
</p>
<div class=\"figure\">
<p><img src=\"modelica://PVSystems/Resources/Images/PVArrayVerificationResults.png\"
alt=\"PVArrayVerificationResults.png\" />
</p>
</div>
<p>
Notice how the variation in the current delivered by the
PV array (sinked by the voltage source) reflects the
familiar PV module curve.
</p>
<p>
Modify the values for the irradiance and temperature
blocks and see how these changes are reflected in a
change in the PV curve, accurately reflecting the
effects of these variables in the PV module
performance. </p>
</html>"),
experiment(
StartTime=0,
StopTime=1,
Tolerance=1e-4));
end PVArrayVerification;