Acausal Modeling and Simulation of The Standalone Solar Power Systems As Hybrid Daes
Acausal Modeling and Simulation of The Standalone Solar Power Systems As Hybrid Daes
Acausal Modeling and Simulation of The Standalone Solar Power Systems As Hybrid Daes
exp(
V
pv
+R
s
I
pv
n
d
N
s
q
KT
c
) 1
V
pv
+R
s
I
pv
R
sh
.
(1)
where V
pv
and I
pv
are, respectively, the output voltage and
current of the PV module and all other symbols are dened
as follows:
q The electron charge (1.6021810
19)
K The Boltzman constant (1.3806610
23)
Ns The number of the PV cells in series as the PV module (-)
Tc The current amount of the PV cell temperature (K)
The photocurrent I
ph
and the reverse saturation current of
the diode I
0
are calculated with (2) and (3) based on available
parameters in the datasheets and the estimated electrical pa-
rameters [3], [13]. The performance of different PV modules
are measured at a standard test condition (STC), which is
dened as follows:
The cell temperature of 25C
The Global solar irradiance of 1000(W/m
2
)
Air Mass of 1.5
Fig. 3 shows the PV current-voltage (IV ) curve indicating
the maximum power point (MPP). The MPP varies due to
changes in operating conditions (i.e. the solar irradiance and
the cell temperature) and requires being followed by a MPPT
algorithm.
I
ph
=
R
s
+R
sh
R
sh
I
sc,stc
+k
I
(T
c
T
c,stc
)
S
S
stc
. (2)
3
I
0
=
I
sc,stc
+k
I
(T
c
T
c,stc
)
exp(
V
oc,stc
+k
V
(T
c
T
c,stc
)
n
d
N
s
q
KT
c
) 1
.
(3)
where:
Isc,stc The short-circuit current of the PV module at the STC (A)
k
I
The temperature coefcient of the short-circuit current (A/C)
k
V
The temperature coefcient of the open-circuit voltage (V/C)
S The current amount of the solar irradiance (W/m)
Sstc The amount of the solar irradiance for the STC (W/m)
Tc,stc The amount of the cell temperature at the STC (K)
Voc,stc The open-circuit voltage of the PV module at the STC (V)
The PV array of the solar power system introduces an
algebraic nonlinear constraints between V
PV
and I
PV
, i.e.,
none of these variables are among degrees of freedom and the
former is an algebraic state.
B. Boost-Type DC-DC converter
The boost-type DC-DC converter is one of the converter
options which is implemented based on the switching-mode
circuit technology containing at least one energy storage and
two semiconductor switches. However, in the ideal case a
single-pole double-throw switch can be used. Figure 4 illus-
trates the electrical circuit for a boost-type DC-DC converter
with an ideal switch.
Middlebrook and Cuk [14] proposed a state-space averaging
approach to model the boost-type DC-DC converter. They
suggested two i
L
and v
C
states for the continuous conduction
mode (CCM) in which the instantaneous inductor current is
always greater than zero. According to the proposed approach
there is a state-space system for the converter at each state of
the switch and the overall state-space model is the weighted
average of these two models. The weighting factor is switching
duty-cycle (D) as the only manipulating control signal. The
switching duty-cycle is the duration of time that the circuit
remains in each state. Equations (4) and (5) provide the
average model of the boost-type DC-DC converter using ideal
switch and diode.
_
i
L
(t)
v
C
(t)
_
=
_
_
_
_
_
_
_
R
L
L
R
C
(1 D)
L(1 +
R
C
R
)
1 D
L(1 +
R
C
R
)
1 D
C(1 +
R
C
R
)
1
RC(1 +
R
C
R
)
_
_
i
L
(t)
v
C
(t)
_
+
_
1
L
0
_
V
in
(t).
(4)
Vout(t) =
_
_
R
C
(1 D)
1 +
R
C
R
1
1 +
R
C
R
_
_
_
i
L
(t)
v
C
(t)
_
. (5)
C. Lead-acid battery
There are different types of batteries applicable for
backup/storage of the solar power system. The authors in [15]
[16] presented a comprehensive reviews and comparisons of
different battery technologies for the renewable energy appli-
cations. The battery introduces an algebraic constraint between
Fig. 4. The electrical circuit of the boost-type DC-DC converter with an
ideal switch.
Fig. 5. Different working zones of the lead-acid batteries.
V
bat
and I
bat
where the former is an algebraic state. Fig. 5
illustrates a complete operating cycle of the battery starting
from the charging zone up to completely being discharged, i.e.,
the exhaustion zone [6]. In Fig. 5, it can be seen that the battery
is a multi-mode component introducing discontinuity to the
system. Tremblay and Dessaint [7] proposed an equivalent
electrical circuit (Fig. 6) as well as the following hybrid
mathematical presenting two modes of operation, namely,
charging, and discharging:
V
bat
=
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
V
0
RI
bat
+ Vexp
P
1
Cmax
Cmax charge
charge
P
1
Cmax
charge + 0.1Cmax
I
bat
mode=charging,
V
0
RI
bat
+ Vexp+
P
1
Cmax
charge Cmax
charge+
P
1
Cmax
charge Cmax
I
bat
mode=discharging.
(6)
mode =
_
charging I
bat
0,
discharging I
bat
> 0.
(7)
dcharge
dt
(t) =
1
3600
I
bat
(t).
(8)
4
Fig. 6. The equivalent electrical circuit for the lead-acid battery.
dVexp
dt
(t) =
_
_
_
_
_
P
2
3600
|I
bat
|(P
3
Vexp) mode=charging,
P
2
3600
|I
bat
|Vexp mode=discharging.
(9)
where V
bat
and I
bat
are the voltage and the current of the
battery, respectively. The parameters P
1
-P
3
are the experi-
mental parameters requires being identied for each type of
the battery and V
exp
(V ) models the exponential behavior of
the battery voltage during the mode transition period. While
the current direction varies instantaneously, the voltage of the
battery changes with an exponential factor after the mode
transition. The C
max
is the maximum amount of the battery
capacity (Ah), R is the internal resistor of the battery (),
charge (Ah) is the actual battery capacity, and V
0
is the
battery constant voltage (V ).
III. SIMULATION
According to the block diagram approach for modeling
and simulation, the system is decomposed into distinguished
blocks with causal interactions. In a sequential procedure
starting from the rst block through all others, the simulator
calculates output values with respect to the inputs and then
feeds the outputs to the next block as their input variables.
Although it is a straightforward approach, it still suffers from
several drawbacks. In order to decompose a system into a
chain of causal interacting blocks, the system must have just
the differential states coupled with algebraic equations to
calculate the outputs. In other words, it must be a system
of ordinary differential equations (ODE) and any algebraic
equation has to calculate only an algebraic variable that is
a degree of freedom. However, most of the electrical and
mechanical systems introduce algebraic states. An algebraic
state is a state of the system which is restricted with an
algebraic equation. Any system consisting of algebraic states,
which are modeled with DAEs rather than ODEs, requires
being simulated employing an acausal approach.
Despite a causal model which expresses an algorithm to
calculate the variables, the acausal modeling is a declarative
approach in which individual parts of the model are directly
described as equations that are in general HDAEs. An HDAE
represents both continuous-time (either differential or alge-
braic) and discrete-time behaviors [9]. Although there are
general purpose numerical HDAE solvers such as tools in
[17],[18],[19], the acausal modeling still needs to be described
with a programming language. Modelica [20], which is an
object-oriented and equation-based language providing the
TABLE I
THE FIRST PLANE OF THE MODELICA CODES MODELING THE SOLAR
POWER SYSTEM.
model HRES SolarSystem
Modelica.Blocks.Sources.Constant Sx(k = 300.0);
Modelica.Blocks.Sources.Constant Tx(k = 298.15);
Modelica.Electrical.Analog.Basic.Ground ground;
HRES.PVArray pvarray(Npvp = 10);
Modelica.Blocks.Sources.TimeTable DutyCycle(table = [...]);
Modelica.Blocks.Sources.Step ramp(startTime = 5, offset = 10,
height = -6);
Modelica.Electrical.Analog.Basic.VariableResistor load;
HRES.BoostConverter converter(Rl = 0.001, Rc = 0.3, L = 0.0005,
C = 0.005);
HRES.LeadAcidBattery battery1;
HRES.LeadAcidBattery battery2;
HRES.LeadAcidBattery battery3;
HRES.LeadAcidBattery battery4;
equation
connect(Tx.y,pvarray.Tx);
connect(Sx.y,pvarray.Sx);
connect(pvarray.n,ground.p);
connect(pvarray.p,converter.p1);
connect(converter.n1,ground.p);
connect(converter.n2,ground.p);
connect(DutyCycle.y,converter.D);
connect(converter.p2,load.p);
connect(ramp.y,load.R);
connect(load.n,ground.p);
connect(converter.p2,battery1.p);
connect(battery1.n,battery2.p);
connect(battery2.n,battery3.p);
connect(battery3.n,battery4.p);
connect(battery4.n,ground.p);
end HRES SolarSystem;
capability to model the hybrid systems [21], is an option to
describe complex systems using an acausal approach. Among
a number of available implementations of the Modelica com-
piler, the OpenModelica platform [22] has been selected for
this study chiey because it supports more features of the
Modelica language comparing with the others. The platform
translates the Modelica descriptions into a at model in the
form of HDAEs, then generates C or XML code from the at
model. The compiled model is simulated using the integrated
DASSL that is a general purpose HDAE solver [19].
Table I shows the rst plane of the developed Modelica
codes that models the standalone solar power system. From
Table I, it can be seen that the proposed model consists of
a PV array connected to a resistive load through a converter.
A battery bank including four lead-acid batteries is employed
to prevent power uctuations. All these components are also
modeled as separate classes of the Modelica language. For
instance, Table II summaries such a model for the lead-acid
battery and its multi-mode operation.
5
TABLE II
A SUMMARY OF THE LEAD-ACID BATTERY MODELICA CLASS.
class LeadAcidBattery
...
equation
chargeState = if noEvent(ibat 0) then true else false;
der(charge) = 1/3600 ibat;
der(V exp) = if chargeState then
P2/3600 abs(i) (P3 V exp)
else (P2 abs(i))/3600 V exp;
when change(chargeState) and pre(chargeState) then
tmp = if not chargeState then
pre(vbat) V 0 R pre(ibat)
(P6 Cmax)/(Cmax pre(charge)) pre(charge)
(P6 Cmax)/(pre(charge) + 0.1 Cmax) pre(ibat)
else 0;
reinit(V exp, tmp);
end when;
soc = 1 charge/Cmax;
vbat = if chargeState then
V 0Ribat (P1Cmax)/(Cmaxcharge) charge
(P1 Cmax)/(charge + 0.1 Cmax) ibat + V exp
else V 0Ribat(P1Cmax)/(Cmaxcharge)charge
(P1 Cmax)/(Cmax charge) ibat + V exp;
end LeadAcidBattery;
IV. RESULTS, VALIDATION, AND DISCUSSION
The proposed model is used to simulate a solar power
system consisting of an array of the Kyocera KC200GT PV
modules [23] and a bank of the Panasonic LC-R127R2PG
lead-acid batteries [24]. The authors in [3] and [7], respec-
tively, presented the identied electrical parameters of the PV
module and the lead-acid battery that are used in this study.
Fig. 7 shows the simulated current-voltage (I V ) and
power-voltage (P V ) curves of the KC200GT PV module
at the STC condition.It is observed that the proposed model
predicts the curve very close to the empirical data provided
by the manufacturer (the circle markers). The simulated MPP
is in the same position of the experimental point as well.
Fig. 8 illustrates the simulation results of the LC-R127R2PG
lead-acid battery [24] for a full cycle as in Fig. 5 that is a
cycle of charging, over-charging, saturation, discharging, over-
discharging, and exhaustion zones. While the battery is being
charged for 100 minutes, it is discharged afterward. It also
indicates that after 25 minutes it enters into the over-charging
zone. Discharging with the current of 7.2A in average, it takes
around 35 minutes for the battery, which matches with the
information available in datasheet [24], to reach the cut-off
voltage that is around 10.2V .
The solar power system is simulated using the proposed
model for the following scenario:
Simulation duration is 10 minutes.
The solar irradiance is 1000W/m
2
and the cell tempera-
ture is 25
C.
The PV array consists of 10 connected KC200GT PV
Fig. 7. The simulated current-voltage curve of the KC200GT PV module at
the STC.
Fig. 8. The simulated (a) battery voltage, (b) battery current, and (c) the
SOC of the battery.
modules in parallel arrangement.
The battery bank consists of 4 connected LC-R127R2PG
lead-acid batteries in series arrangement.
The manipulating control signal changes according to a
stepwise pattern.
The load demand suddenly increases at t = 5.
After 6 minutes the generated power by the PV array
declines.
In Fig. 9, it can be seen that the battery absorbs excess
energy when there is and provides the decit energy when the
PV module cannot provide adequate energy. For the rst 5
minutes, the generated power is more than load demand and
the battery, which absorbs the excess energy, is in charging
mode. The load demand suddenly increases to more than the
6
Fig. 9. The simulated battery, load, and PV powers.
Fig. 10. The simulated SOC and the voltage of battery bank.
Fig. 11. The simulated battery current.
generated power at t = 5 minutes that switches the state
of the battery, which now provides the decit energy, to the
discharging mode. At t = 6 minutes the battery provides more
power because the generated power by the PV array declines
even less due to manipulating of the control signal. Fig. 9
illustrates a power loss of around 10% in the DC-DC converter,
which is the difference of the power generated by the PV array
and the sum of the load and the battery powers, chiey because
of the internal resistance of the coil.
Fig. 10 illustrates the details of battery bank. It is ob-
served that during the period of charging of the battery bank
(time < 5 minutes), the voltage and the SOC of the battery
bank increase continuously. However, the voltage of the battery
suddenly falls at t = 5 minutes to the nominal value by the
transition from charging mode to discharging mode. There
is another step change at t = 6 minutes as the result of
decreasing the generated power by the PV array (Fig. 9). The
SOC also declines moderately after t = 5 minutes since the
battery is being discharged.
Finally, Fig. 11 depicts the variation of the battery bank
current during the simulation period. While it is less than zero,
which means the battery bank is in charging mode, before the
time = 5 minutes, it suddenly becomes greater than zero after
entering in the discharging mode. The small step changes are
due to variation in the control signal causing changes in the
harvested energy from the PV array. A load demand increase
at t = 6 minutes causes a sharp climb of the battery bank
current that matches the power variation in Fig. 9.
V. CONCLUSION
This paper proposes an acausal model, which is based on
the HDAE, to simulate the solar power system. The proposed
model presents the nonlinear algebraic constraints, which
are introduced by the PV array and the battery, as DAEs.
Moreover, it models different modes of the battery operation
as a hybrid system. The Modelica language is employed to
describe the system as an acausal model organized as separate
Modelica classes for different components. The OpenMod-
elica environment as an integrated modeling and simulation
Modelica tool-set is used to simulate the system with the
DASSL general purpose integrator. The PV array and the
lead-acid battery bank are separately simulated and validated
with information available in datasheets that show very good
accuracy. The whole solar power system is also simulated and
discussed thoroughly indicating accurate prediction of all the
system behaviors including mode transitions. The highest level
Modelica codes as well as a summary of the battery Modelica
class are presented.
VI. ACKNOWLEDGMENT
The authors would like to thank the Synchron Technol-
ogy Ltd. company for their partial nancial support of this
research.
REFERENCES
[1] I. H. Altas, and A. M. Sharaf. A photovoltaic array
simulation model for matlab-simulink GUI environment.
In Proc. Intl. Conf. Clean Elect. Power (ICCEP), pages
341345, 2007.
[2] M. Buresch. Photovoltaic Energy Systems Design and
Installation. McGraw-Hill, New York, 1983.
[3] M. G. Villalva, J. R. Gazoli, and E. R. Filho. Compre-
hensive approach to modeling and simulation of photo-
voltaic arrays. IEEE Transactions on Power Electronics,
24:11981208, 2009.
[4] F. M. Petcut, and T. L. Dragomir. Solar cell parame-
ter identication using genetic algorithms. Journal of
Control Engineering and Applied Informatics, 12:3037,
2010.
[5] C. Carrero, J. Amador, and S. Arnaltes. A single
procedure for helping PV designers to select silicon PV
7
modules and evaluate the loss resistances. Journal of
Renewable Energy, 32:25792589, 2007.
[6] D. Guasch, and S. Silvestre. Dynamic battery model
for photovoltaic applications. Progress in Photovoltaics:
Research and Applications, 11:193206, 2003.
[7] O. Tremblay ,and L. Dessaint. Experimental validation
of a battery dynamic model for ev applications. World
Electric Vehicle Journal, 3:1015, 2009.
[8] M. Naja,and R. Nikoukhah. Modeling and simulation
of differential equations in scicos. In The Modelica
Association, editor, Modelica Conference, 2006.
[9] H. Lundvall, P. Fritzson, and B. Bachmann. Event han-
dling in the openmodelica compiler and runtime system.
In the 46th Conference on Simulation and Modeling
(SIMS 2005), Trondheim, Norway, 2005.
[10] M. K. Deshmukh, and S. S. Deshmukh. Modelling
of hybrid renewable energy system. Renewable And
Sustainable Energy Reviews, 12:235249, 2008.
[11] J. J. Soon, and K. S. Low. Photovoltaic model identi-
cation using particle swarm optimization with inverse
barrier constraints. IEEE Transactions on Power Elec-
tronics, 27:39753983, 2012.
[12] K. Ishaque, Z. Salam, and H. Taheri. Simple, fast
and accurate two-diode model for photovoltaic modules.
Journal of Solar Energy Materials and Solar Cells,
95:586594, 2011.
[13] Q. Kou, S. A. Klein, and W. A. Beckman. A method for
estimating the long-term performance of direct-coupled
PV pumping systems. Journal of Solar Energy, 64:33
40, 1998.
[14] R. D. Middledbrook,and S. Cuk. A general unied ap-
proach to modelling switching-converter power stages. In
Proc. of IEEE Power Electronics Specialist conference,
1976.
[15] M. Beaudin, H. Zareipour, A. Schellenberglabe, and W.
Rosehart. Energy storage for mitigating the variability of
renewable electricity sources: An updated review. Energy
for Sustainable Development, 14:302314, 2010.
[16] K. C. Divya, and J. Ostergaard. Battery energy storage
technology for power systems an overview. Electric
Power Systems Research, 79:511520, 2009.
[17] SUNDIALS. Suite of nonlinear and
differential/algebraic equation solver.
https://computation.llnl.gov/casc/sundials/.
[18] DAETS. Defferential-algebraic equations by taylor se-
ries. www.cas.mcmaster.ca/ nedialk/dates/.
[19] DASSL. Defferential algebraic system solver.
www.cs.ucsb.edu/ cse/.
[20] Modelica. Modelica association. www.modelica.org.
[21] P. Fritzson. Introduction to modelling and Simulation
of Technical and Physical Systems with Modelica. John
Wiley & Sons, New York, 2011.
[22] OpenModelica. Open-source modelica-based modeling
and simulation env. www.openmodelica.org.
[23] Kyocera. KC200GT, high ef-
ciency multicrystal photovoltaic module.
www.kyocerasolar.com/assets/001/5195.pdf, 2012.
[24] Panasonic. LC-R127R2PG, panasonic batteries.
www.farnell.com/datasheets/1624915.pdf.