Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chaires 2016

Download as pdf or txt
Download as pdf or txt
You are on page 1of 69

SOLAR FARM HOURLY DISPATCHING USING A SUPERCAPACITOR

AND BATTERY ENERGY STORAGE SYSTEM

A thesis presented to the faculty of the Graduate School of


Western Carolina University in partial fulfillment of the
requirements for the degree of Master of Science in Technology.

By

Jordan Chaires

Director: Dr. Bora Karayaka


Assistant Professor
Department of Engineering and Technology

Committee Members: Dr. Yanjun Yan, Department of Engineering and


Technology
Dr. Patrick Gardner, Department of Engineering and Technology

April 2016

©2016 by Jordan Chaires


My thesis is dedicated to my mother for all the road trips you’ve made over the last 6 years to
visit me in the mountains, for the endless number of sports and hobbies you let me try out as a
child, for having the pride of two parents, and for your love.

Love you Ma.


ACKNOWLEDGEMENTS

Thank you to all of my professors for your patience and encouragement over the last 6 years. My
time spent at Western has helped me to develop in all areas of my life. Thank you to Dr. Gardner
and all of the Rapid Center staff for giving me the opportunity to learn and apply myself. You all
held high expectations of me that gave me the confidence to succeed at those challenges. Thank
you to the Kimmel School and Graduate School for financial support, for without I would not
have been able to reach as far into my research as I did. Thank you to my Thesis Committee
for your extra time and effort to help me with my conference paper and my thesis. The guidance
and support I received from you all will carry with me in my journey as an Engineer. Thank
you Ariana for supporting me and loving me during all of those late nights spent working on
homeworks, projects, papers, and job searching. You balanced all of the stress that comes from
embarking on a life long journey and I love you.
TABLE OF CONTENTS

List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
CHAPTER 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CHAPTER 2. Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Current Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Chosen Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
CHAPTER 3. Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1 System Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Control of PVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Dispatchable Power Level Estimation . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Control of HESS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Power Spectral Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
CHAPTER 4. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1 One-Hour Detailed Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Full Day Dispatching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
CHAPTER 5. Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . 31
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
APPENDIX A. Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
LIST OF TABLES

3.1 PGrid,ref calculated from adjusting PGrid,est. with BESS SOC . . . . . . . . . . . . 14


3.2 BESS PI Controller Limits where DC Bus is 500V . . . . . . . . . . . . . . . . . . 17
3.3 SESS PI Controller Limits where DC Bus is 500V . . . . . . . . . . . . . . . . . . 18
LIST OF FIGURES

2.1 Typical output of a photovoltaic cell during one day [1] . . . . . . . . . . . . . . 3


3.1 Solar Farm and HESS Power Flow [2] . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Incremental Conductance MPPT Algorithm [2] . . . . . . . . . . . . . . . . . . . 9
3.3 Simulink Model of PVES Control System . . . . . . . . . . . . . . . . . . . . . . . 10
3.4 Simulink PVES Average DC/DC Converter Model . . . . . . . . . . . . . . . . . . 10
3.5 P-V Characteristics of Array at 25◦ C [2] . . . . . . . . . . . . . . . . . . . . . . . 10
3.6 P-V Characteristics of Array at 1kW/m2 [2] . . . . . . . . . . . . . . . . . . . . . 11
3.7 Interpolated plot of MPP’s for PV array at 25◦ C [2] . . . . . . . . . . . . . . . . . 12
3.8 Interpolated plot of MPP’s for PV array at 1kW/m2 [2] . . . . . . . . . . . . . . . 12
3.9 PGrid,ref calculation for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.10 Simulink HESS Reference Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.11 Simulink HESS PI Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.12 Simulink BESS PI Controller Model [2] . . . . . . . . . . . . . . . . . . . . . . . . 16
3.13 Simulink SESS PI Controller Model . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.14 BESS Bidirectional DC/DC Converter Average Model [2] . . . . . . . . . . . . . . 18
3.15 BESS Bidirectional DC/DC Converter Average Model [2] . . . . . . . . . . . . . . 18
4.1 Solar Farm with HESS Matlab Simulink Model . . . . . . . . . . . . . . . . . . . 21
4.2 Solar Data for June 9th, 2015 from 11:00 to 12:00 [2] . . . . . . . . . . . . . . . . 22
4.3 Interpolated Plot of MPP’s for PV array at 25◦ C [2] . . . . . . . . . . . . . . . . . 22
4.4 Interpolated plot of MPP’s for PV array at 1kW/m2 [2] . . . . . . . . . . . . . . . 23
4.5 PVES, HESS, and Grid Power for June 9th, 2015 from 11:00 to 12:00 [2] . . . . . 23
4.6 Spectrogram Analysis of HESS for June 9th, 2015 from 11:00 to 12:00 . . . . . . . 24
4.7 Spectrogram Analysis of SESS for June 9th, 2015 from 11:00 to 12:00 . . . . . . . 24
4.8 Spectrogram Analysis of BESS for June 9th, 2015 from 11:00 to 12:00 . . . . . . . 25
4.9 Solar Data for June 9th, 2015 from 5:00 to 20:00 [3] . . . . . . . . . . . . . . . . . 26
4.10 PGrid,est for June 9th, 2015 from 5:00 to 20:00 . . . . . . . . . . . . . . . . . . . . 26
4.11 Dispatched Power in Comparison to it’s Reference for June 9th, 2015 from 5:00 to
20:00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.12 Error of Dispatched Power for June 9th, 2015 from 5:00 to 20:00 . . . . . . . . . . 27
4.13 PVES, HESS, and Grid Power for June 9th, 2015 from 5:00 to 20:00 . . . . . . . . 28
4.14 BESS SOC for June 9th, 2015 from 5:00 to 20:00 . . . . . . . . . . . . . . . . . . 28
4.15 BESS Energy used for June 9th, 2015 from 5:00 to 20:00 . . . . . . . . . . . . . . 29
ABSTRACT

SOLAR FARM HOURLY DISPATCHING USING A SUPERCAPACITOR AND BATTERY EN-


ERGY STORAGE SYSTEM

Jordan Chaires, M.S.T.


Western Carolina University (April 2016)
Director: Dr. Bora Karayaka

While most research on solar energy has been concentrated on smoothing intermittent power
being pushed into the power grid, this research is focused on improving the complete integration
of solar energy into the power grid by dispatching, or supplying a constant level of power, for 1-
hour time periods. A hybrid energy storage system (HESS), consisting of lead-acid batteries and
supercapacitors, will absorb and supply the necessary levels of power to keep the systems output
power constant. The demand on the overall HESS and the two components in HESS, lead-
acid batteries and supercapacitors, will maintain the constant level of power to dispatch. The
predicted level of output power, for a one hour dispatching period, is determined by an estimation
algorithm that uses actual solar data from Oak Ridge National Laboratory collected every minute
throughout the day. This research shows results from June 9th, 2015, June 10th, 2015, June 12th,
2015, and December 25th, 2015 between 5:00 AM and 7:59 PM [3]. The estimation algorithm
incorporates the solar irradiance and temperature to estimate the PV arrays average output
power and its efficiency. The demand on the HESS is sent through a low-pass filter with a time
constant of 1-minute that is then used as the reference for the lead-acid batteries. The remaining
demand on the HESS is used as the reference for the supercapacitors. This utilizes the lead-acid
batteries high energy density property, or slow charge/discharge rates at high energy levels, and
the supercapacitors high power density property, or rapid charge/discharge rates at low energy
levels [1, 4].
CHAPTER 1: INTRODUCTION

1.1 Key Terms

Intermittent: A power source that varies in power levels through time is said to be an inter-
mittent power source. Solar energy is an intermittent power source.

Dispatchable: A power source that is capable of supplying a constant power on demand is a


dispatchable power supply.

Synergy : A greater outcome of two elements when combined than individually is synergy. A
supercapacitor in combination with a battery shows synergy [1].

Battery Bank : Multiple batteries connected to provide a greater combined capacity.

Supercapacitor Bank : Multiple supercapacitors connected to provide a greater combined ca-


pacity.

State of Charge (SOC): A battery’s capability to hold a specific amount of charge in reference
to its original capability determines the batteries’ SOC and is represented as a percentage.

Depth of Discharge (DOD): A battery’s lowest depletion SOC is quantifiable as its DOD. To
increase the longevity of a battery, it should not be depleted beyond its recommended DOD.

Additional notations are defined as needed throughout this dissertation. Definitions of


some terms already defined may be repeated for the sake of clarity and emphasis.

1.2 Problem Statement

Solar energy has the potential to greatly increase the Earths longevity by decreasing greenhouse
gas emissions. To maximize the use of solar energy, energy storage devices and methods must
be optimized. Although some research has been done to integrate battery systems with solar
PV systems, there are still system conditions, such as number of charge/discharge cycles of the
batteries, that are not being taken into account and could greatly improve the efficiency of the
system [5]. Utilizing the combination of a battery and supercapacitor, we will be capable of mini-
mizing charge/discharge cycles of the batteries while delivering a constant and reliable renewable

1
power to the utility grid. The base load of the dispatched power will be provided using a lead-
acid battery bank while the peak power demands will be compensated using a supercapacitor
bank. The combination of supercapacitors with lead-acid batteries creates synergy because of
the supercapacitor’s high power density property and the lead acid battery’s high energy density
property. The supercapacitor’s high power density property allows the supercapacitor bank to
charge/discharge quickly. The lead acid battery’s high energy density property allows the battery
bank to charge/discharge at higher energy levels. The combination of the two creates synergy
because the supercapacitor can be used to absorb high frequency power components of the system
demand to provide smoother power demand on the battery bank. A smoother power demand on
the battery bank will decrease the number of charge/discharge cycles for the battery resulting in
a longer battery life.

The outline of this thesis will follow the design process of a solar farm system with the
integration of a battery bank and supercapacitor bank to provide a constant dispatchable power
to the utility grid. In Chapter 2: Literature Review, research on related topics will be analyzed in
order to determine the direction, objectives, and techniques to be used for extending the lifespan
of the battery in the PV system. Then, in Chapter 3: Methodology, control methods and analysis
tools to be applied to the system will be examined. Chapter 4: Anticipated Results will apply
analysis tools from Chapter 3 on results from Matlab Simulink simulations. Finally, Chapter 5:
Conclusion and Future Work explores areas of this research that could be expanded upon.

2
CHAPTER 2: LITERATURE REVIEW

2.1 Background

Renewable energy sources have been increasing in popularity and therefore have become an in-
teresting topic of research due to their ability to allow the world to become less reliant on fossil
fuels such as oil, coal, and gas [5]. This means that solar energy has the potential to greatly
increase Earth’s longevity by decreasing greenhouse gas emissions. Optimization in harnessing
the solar energy is important because it means creating a system that will be capable of wasting
little power that results in economic advantages as well as environmental advantages. Increasing
the efficiency of a power source will inevitably increase the rate of return on the investment into
solar energy.

Figure 2.1: Typical output of a photovoltaic cell during one day [1]

Solar energy is naturally an intermittent renewable resource, which means providing vary-
ing power levels due to natural and meteorological conditions, and is only sporadically available [5].
Figure 2.1 is an example of a typical output by a PV cell during the daytime and shows how spo-
radic solar power can be. Power electronics, which are used to monitor and control power flow into,
out of, and through the utility grid are not designed with the large power fluctuations introduced

3
by renewable energies. So, the intermittence of solar energy poses a great challenge in power
electronics when it is connected directly to the utility grid. However, by creating a system that is
capable of storing this harvested energy it is possible to convert solar energy into a dispatchable
power supply that can be used throughout the day.

Storage of the solar energy through batteries, supercapacitors, compressed air, and pumped
hydro storage have been shown to smooth varying output power from PV systems connected to
power grids [6]. The size of such storage systems has been investigated in order to minimize initial
cost of the system while also focusing on increasing efficiency of the system. Optimizing the ratio
of photovoltaic cells to storage size is an essential step to the optimization of the system.

The supercapacitor has a high power density property, which means it is capable of fast
charge/discharge rates at lower energy levels, whereas a battery, such as the lead-acid battery,
has a high energy density, which means it is capable of charging and discharging at higher energy
levels but at slower charge/discharge rates [1, 4].

2.2 Current Techniques

There are many characteristics of designing a power source that must be taken into consideration
in order to have an optimized system. The capacity size of an energy storage device, such as a
battery bank, used to harvest power from an intermittent power source (i.e. solar energy) will
determine the system’s smoothing capability. For a system to be dispatchable it must be able
to supply constant amounts of power for specific durations of time. The size of a storage device,
is dependent on the control strategy being implemented on the system, charge/discharge rate
requirements, and the purpose of the system (standalone or grid-connected) [6]. However, cost
restrictions to a systems design will be a major constraint to the size selection of the storage
device. Proper investigation of balancing size, cost, and efficiency during the design of a system
will increase the likelihood of creating an optimal system.

Limiting the state of charge (SOC) of lead-acid batteries can help to increase the lifespan
and can minimize maintenance needs. Keeping the battery SOC at or below 100% is crucial for
the lifespan of the battery as to prevent overcharging the battery. However, other research has

4
proposed limiting the charge to 70% to prevent overcharge of lead acid batteries [7]. The depth
of discharge (DOD) can also affect the longevity of lead-acid batteries. Some lead-acid batteries,
referred to as deep discharge batteries, are capable of being discharged to an SOC of 0%. For other
lead-acid batteries, preventing the DOD of the battery to reach 0% is crucial as this will greatly
reduce the lifespan of a lead-acid battery [1]. A DOD of 30% is commonly used to extend the
lifetime of a lead-acid battery [7]. Also, most manufactures will have a recommended discharge
rate. However, other discharge rates may be used but with some limitations. For example, a
manufacturer may provide a recommended discharge rate of 100mA and state that the battery
can provide this power for 10 hours, if the battery is rated 1Ah. Although a smaller discharge
rate such as 50mA is acceptable, high discharge rates such as 2A are not recommended. Contrary
to the assumption that a battery rated at 1Ah could be discharged at 2A for the duration of half
an hour, discharge rates have non-linear characteristics and should not be discharged at higher
than recommended discharge rates. These theoretical values can vary depending on an individual
battery’s unique energy loss characteristics and the operating range.

Maximum power point tracking algorithms (MPPT) are used to optimize the output power
of a photovoltaic (PV) array by controlling the duty ratio of a DC/DC converter directly connected
to the PV array. The duty ratio is the on/off switching ratio of a converter that is determined
by the desired reduction or gain from the input voltage to the output voltage. A few of these
algorithms are Perturb and Observe (P&O), Incremental Conductance (IncCond), Constant Volt-
age, Constant Current and fuzzy logic based algorithms [8]. The two most common algorithms
used for MPPT in current technology are P&O and IncCond. The P&O algorithm is slower than
the IncCond algorithm when weather conditions change solar irradiation levels at a fast rate.
The IncCond algorithm is simple and more efficient at optimizing the provided irradiation to the
PV array than P&O [9]. However, IncCond will produce small oscillations around the maximum
power point (MPP) it’s tracking.

Utilizing a combination of a battery and supercapacitor can help smooth the intermittent
solar power for dispatching by charging/discharging fluctuating power produced by the PV array.
This is due to the capability of supercapacitors to charge/discharge quickly, which can help to
reduce drastic fluctuations (high frequencies) of power to the battery during charge/discharge

5
cycles, without having to alter the MPPT algorithm that controls the duty cycle of the boost
converter [1]. This combination has also been researched with hybrid electric vehicles and was
proven to improve the lifespan of a battery by minimizing large output currents to the motor by
use of a supercapacitor [10]. The required size of the supercapacitor will depend on the maximum
required energy needed by the system from the supercapacitor and can be calculated using Eq.
(2.1) where E is energy measured in Joules, C is the supercapacitor’s capacitance measured in
Farads, and V is the supercapacitor’s voltage measured in Volts [11].

1
E = C ×V2 (2.1)
2

2.3 Chosen Techniques

A 100kW PV array chosen for implementation will be directly connected to a DC/DC converter
controlled by the IncCond MPPT algorithm because of it’s superior efficiency at extracting the
maximum amount of power from the given solar power [9]. Also, a lead-acid battery bank of 250V
and 200Ah will be used in combination with a supercapacitor bank of 270V and 700F to create
a dispatchable power to the utility grid. The lead-acid battery bank will have a DOD of 40%,
which is an SOC range of 60% to 100%. Also, a rule-based control method will be implemented
to prevent the battery bank from operating outside of its SOC range. Another rule-based control
method will be used to adjust the reference power of each dispatching period to keep the SOC of
the battery bank around 80%. The supercapacitor bank will be used to buffer the high frequency
components of the PV array and decrease the number of charge/discharge cycles of the battery,
which will increase the lifespan of the battery.

6
CHAPTER 3: METHODOLOGY

3.1 System Topology

Figure 3.1: Solar Farm and HESS Power Flow [2]

The photovoltaic energy system (PVES) consists of a 100kW solar farm that outputs power
through a DC/DC converter. The hybrid energy storage system (HESS) consists of a 250V ,
200Ahr lead-acid battery bank, a 270V , 700F supercapacitor bank, and a DC/DC converter
connected to each bank. The combination of the battery bank and the DC/DC converter directly
connected to it is referred to as the battery energy storage system, or BESS. The combination of
the supercapacitor bank and the DC/DC converter directly connected to it is referred to as the
supercapacitor energy storage system, or SESS. The PVES and HESS are connected in parallel
to the DC-link cap, acting as the DC bus. The voltage level of the DC bus is controlled by the
DC/AC inverter, or grid-connected converter (GCC). Because the PVES and HESS are connected
to the DC bus as current sources and the GCC controls the DC bus voltage, stable power flow

7
is obtainable by adjusting current flow through the DC/DC converters [12]. It is important to
mention that the DC/DC converter of the PVES is uni-directional, meaning the power flow is
only to flow out of the PVES and towards the HESS and/or the DC bus. However, the DC/DC
converters of the HESS are bi-directional and are independently operated. Both the BESS and
the SESS have three modes of operation in the proposed methodology:

1. Charging

2. Discharging

3. No power flow

3.2 Control of PVES

The solar farm component of the PVES is a photovoltaic (PV) array comprised of 66 parallel
strings and five series connections of SunPower SPR-305-WHT solar cells. The available power
from the PV array relies on two weather conditions:

1. Solar Irradiation (W/m2 )

2. Solar Cell Temperature (◦ C)

This research was conducted using actual data recorded at Oak Ridge National Laboratory
(ORNL) using global horizontal irradiation and air temperature as an estimate of the solar cell
temperature. It is important to mention that although actual cell temperature may be higher
than ambient temperature in practice, it is beyond the scope of this research to account for these
complex dependencies. Therefore, for the sake of simplicity ambient and cell temperatures are
assumed to be the same.

As mentioned in Section 3.1, the DC/DC converter in the PVES is uni-directional so the
power flow is only out of the PVES and is controlled by the incremental conductance maximum
power point tracking (MPPT) algorithm. As mentioned in Section 2.3, incremental conductance
MPPT is highly efficient producing the maximum power for highly intermittent solar irradiation.

8
The detailed flow chart of incremental conductance shown in Fig. 3.2 represents the function
block in Fig. 3.3. The average model of the PVES DC/DC converter is shown in Fig. 3.4 and
was derived from the DC/DC average converter model in Power Electronics: A First Course by
N. Mohan [13]. The PVES converter uses the DP V ES , or duty cycle for the PVES, signal as the
input control signal. The duty cycle, as defined in Section 2.2, determines the ratio of output
voltage to input voltage.

Figure 3.2: Incremental Conductance MPPT Algorithm [2]

3.3 Dispatchable Power Level Estimation

An estimate as to how much power can be efficiently dispatched is predicted for each dispatching
hour using the solar irradiation and temperature data from ORNL [3]. The estimated dispatchable
power for each hour is referred to as the grid reference power (PGrid,ref ) and will be used as a

9
Figure 3.3: Simulink Model of PVES Control System

Figure 3.4: Simulink PVES Average DC/DC Converter Model

target power level for the PVES and HESS to provide to the utility grid. PGrid,ref is calculated by
estimating the average power that the PVES is capable of providing over each one-hour dispatching
period. The PV array module in Matlab/Simulink provides power-voltage characteristic curves
based on user-input parameters such as solar cell type, number of cells in parallel, and number
of cells in series. This information provides estimated power curves for discrete solar irradiation,
measured in W/m2 , levels at a set cell temperature of 25◦ C shown in Fig. 3.5 and discrete cell
temperatures, measured in ◦ C, at a set solar irradiation level of 1000kW/m2 shown in Fig. 3.6.

Figure 3.5: P-V Characteristics of Array at 25◦ C [2]

10
Figure 3.6: P-V Characteristics of Array at 1kW/m2 [2]

The maximum power points (MPP’s) are indicated as circles located at the maximum
power point of their respective curves in Figs. 3.5 and 3.6. By interpolating the MPP’s from
Fig. 3.5, one curve is created to which the average irradiation for one hour can be mapped and
a corresponding power estimate for PVES can be made. The interpolated plot of MPP’s for PV
array at 25◦ C is shown in Fig. 3.7. Likewise, by interpolating the MPP’s from Fig. 3.6, one curve
is created to which the average temperature for one hour can be mapped and a corresponding
efficiency for PVES can be made. The conversion from the y-axis, power (W), from Fig. 3.6 to the
y-axis, efficiency (%) of Fig. 3.8 is done by assigning 0◦ C to be 110% efficiency, 25◦ C to be 100%
efficiency, 50◦ C to be 85% efficiency, 75◦ C to be 75% efficiency, and 100◦ C to be 65% efficiency.
This assignment was designed around setting 100kW to be 100% efficiency and 0kW to be 0%
efficiency.

The resolution of the solar irradiation data from ORNL is one sample/minute. A better
approximation to the average irradiation can be made if the the resolution of the data set is
higher. Cubic spline interpolation is performed to create a set of solar irradiation data samples
with a resolution of one sample every half second or 120 samples/minute. For each dispatching
hour, the average irradiation is calculated by performing the mean operation and then mapped to
the interpolated plot of MPP’s for PV array at 25◦ C in Fig. 3.7. The power level estimated from
the average irradiation is referred to as PP V ES,est. . Likewise, the average temperature for each
dispatching hour is calculated by performing the mean operation to the interpolated temperature
data set and is then mapped to the interpolated plot of MPP’s for PV array at 1kW/m2 in

11
Figure 3.7: Interpolated plot of MPP’s for PV array at 25◦ C [2]

Figure 3.8: Interpolated plot of MPP’s for PV array at 1kW/m2 [2]

Fig. 3.8. The efficiency estimate provided by the average temperature is referred to as ηP V ES,est. .
The final estimated power dispatchable by PVES is PP V ES,est. adjusted by ηP V ES,est. multiplied
by a constant factor of 0.95 shown in Eq. (3.1). The 0.95 factor is an estimated compensation for

12
the inefficiency of IncCond MPPT.

PGrid,est. = 0.95 × PP V ES,est. (kW ) × ηP V ES,est. (%) (3.1)

Figure 3.9: PGrid,ref calculation for simulation

In order to mitigate errors that could propagate through a longer simulation and could
lead to the battery bank’s SOC that is too high or too low (i.e. above or below 80%) before
entering a new dispatching period, the PGrid,est. is also adjusted at the start of each dispactching
period. The adjustment factor to PGrid,est. directly corresponds to the BESS SOC at the end
of each dispatching period. This is done by a rule based control algorithm that creates bounds
represented by 10% SOC ranges that correspond to a multiplying factor. The ranges are from
an SOC of 60% to 100% because of the 40% DOD mentioned in Section 2.3. The SOC and
corresponding multiplying factors are shown in Table. 3.1. The resulting adjusted power level is
referred to as the grid reference power (PGrid,ref ) and is the target power level for the entire system
to provide the utility grid for the entire duration of the one-hour dispatching period. Table 3.1
is a representation of the function block shown in Fig. 3.9 used to calculate PGrid,ref ; the power
expected to be dispatched.

13
Table 3.1: PGrid,ref calculated from adjusting PGrid,est. with BESS SOC
BESS Multiplying Factor
100% ≥ SOC > 92% 1.10
92% ≥ SOC > 84% 1.05
84% ≥ SOC > 76% 1.00
76% ≥ SOC > 68% 0.95
68% ≥ SOC ≥ 60% 0.90

3.4 Control of HESS

The HESS is responsible for maintaining the system’s power injected into the utility grid, following
the control framework proposed by Zheng et. al [12] while the GCC maintains a constant DC
Bus voltage of 500V . So, the reference power for the HESS (PHESS,ref ) is the difference between
PP V ES and PGrid,ref as shown in Eq. (3.2).

PHESS,ref = PGrid,ref − PP V ES (3.2)

A low-pass filter (LPF) with a time constant of 60 seconds, or a cutoff frequency of 0.0167
Hz, is used to provide the BESS with a power reference referred to as PBESS,ref . The power refer-
ence for the SESS, referred to as PSESS,ref is the difference between PHESS,ref and PBESS,ref and
is comprised of the high frequency components of PHESS,ref . A rule based algorithm, represented
by the ”Rule-Based DOD” function in Fig. 3.10, is used to prevent the BESS SOC from going
above 100% SOC or below it’s DOD of 40%, which is an SOC of 60%. The ”Rule-Based DOD”
function declares that if the SOC of BESS is at 100% and PBESS,ref from the LPF is negative,
meaning the demand on BESS is to charge, then the PBESS,ref signal to BESS will be to provide
0W to the system. Otherwise, PBESS,ref is the output signal from the LPF. Likewise, if the SOC
of BESS is at 60% and PBESS,ref from the LPF is positive, meaning the demand on BESS is to
discharge, then the PBESS,ref signal to BESS will be to provide 0W to the system. Otherwise,
PBESS,ref is the output signal from the LPF.

The reference signals for the BESS and SESS are compared with their current output
powers to determine the change in duty ratio, which controls the ratio of output to input voltage
ratio, necessary to mitigate the proportional error and integral error. This controller is referred
to as a proportional and integral, or PI, controller. The model mask for the BESS PI controller

14
Figure 3.10: Simulink HESS Reference Model

and the SESS PI controller are shown in Fig. 3.11 with the inputs being the reference power and
current power and the output is the control signal to their respective DC/DC converters.

Figure 3.11: Simulink HESS PI Controls

The PI controllers for the BESS and SESS are modeled as shown in Figs. 3.12 and 3.13. The
delays ( z1 ) in these figures are added to break algebraic loops and improve simulation execution
speed. The difference between the reference power and the current power, as shown in Eq. (3.3),
is used to calculate the PI control signal using Eq. (3.4) [14]. The overshoot of the response
from the converter is controlled by the proportional gain constant KP , which is based on the
present error. The larger KP becomes, the more sensitive the system will be and will result in
stronger overshoots [2]. The settling time of the response from the converter is controlled by the
integral gain constant KI , which is based on the integral error, or accumulating error. The larger
KI becomes, the response will settle faster and will result in less residual steady-state error [2].
However, as KI becomes larger the response has a stronger overshoot that leads to further tuning
of KP to be needed in order to obtain the desired response from the converter.

e(t) = Pactual (t) − Pref (t) (3.3)

15
Figure 3.12: Simulink BESS PI Controller Model [2]

Figure 3.13: Simulink SESS PI Controller Model

Z t
P I(t) = KP × e(t) + KI e(τ )dτ (3.4)
0

The proportional gain constant KP and the integral gain constant KI for both the BESS
and the SESS converter were found through manual tunning and observing the response of the
converters to reaching PBESS,ref and PSESS,ref respectively with minimal overshoot and quick
settling time. For the BESS PI controller, KP is 6e − 4 and KI is 5e − 3. For the SESS PI
controller, KP is 1e − 3 and KI is 5e − 1.

The PI control signal is adjusted by an initial value Dinit to mitigate initial transients from
the converter’s response caused by a drastic change in duty ratio. Such drastic initial transients
of the PI control signal can harm the energy storage system (ESS). Dinit for both PI controllers
is determined by the initial voltage of the ESS and is set to initialize the output voltage to 500V ,
the DC bus voltage, resulting in an initial reference power level to be 0W . The battery bank’s
initial SOC is 80%, as explained in Section 2.3, which means the battery bank’s initial voltage is
254V based on Simulink model. The battery bank’s voltage is considered the input voltage (254V )

16
Table 3.2: BESS PI Controller Limits where DC Bus is 500V
SOC Battery Bank Voltage Duty Ratio
100% 272V 0.54
80% 254V 0.508
60% 250V 0.5017

to the converter and the DC bus voltage (500V ) is considered the output voltage. Theoretically
speaking based on the average model used, when ESS is in charge mode DC/DC converters operate
in buck mode, when ESS is in discharge mode the converters operate in boost mode. According
to the average model of a boost converter, the control signal must be a signal of 1 − D where D is
a duty ratio, and the PI controller produces only a duty ratio signal D then the equation shown
in Eq. (3.5) can be simplified to Eq. (3.6). The Dinit for an input voltage of 254V is calculated
to be 0.508.

Vout 1
= (3.5)
Vin 1−D
1
=
1 − (1 − D)
Vin
=D (3.6)
Vout

Following the same procedure to find Dinit for the BESS PI controller, Dinit for the SESS
PI controller can be calculated. The input voltage is the supercapacitor bank at it’s initial SOC
of 80%, as mentioned in Section 2.3 that is 216V and the output voltage is the DC bus voltage
that is 500V . Therefore Dinit for the SESS PI controller is calculated to be 0.4315.

In order to prevent the BESS or the SESS from damage caused by a PI control signal
outside of the operating voltage range, mentioned in Section 2.3, a limiter module is placed at the
end of the PI controller model. The limit of the PI controller for the BESS is from 0.6 to 0.4 and
for the SESS is from 0.6 to 0.3. The limits of the PI controllers were found using the operating
range limitations shown in Tables 3.2 and 3.3.

The DC/DC converters being used to control power flow into and out of the BESS and
the SESS are power converters with bidirectional power flow. The change in power flow from the

17
Table 3.3: SESS PI Controller Limits where DC Bus is 500V
SOC SC Bank Voltage Duty Ratio
100% 270V 0.54
80% 216V 0.4315
60% 162V 0.324

ESS to the DC bus or vice-versa is done by an adjustment to the duty ratio that either lowers
or raises the voltage on the current port (ESS side) below or above the current voltage held by
either the battery bank or supercapacitor bank. So, if the battery bank is currently 250V and the
duty ratio is set by the PI controller to be 0.508 than the voltage on the battery bank will rise to
254V essentially charging the BESS with power from the DC bus. The BESS and SESS average
models of a DC/DC converter are shown in Figs. 3.14 and 3.15.

Figure 3.14: BESS Bidirectional DC/DC Converter Average Model [2]

Figure 3.15: BESS Bidirectional DC/DC Converter Average Model [2]

3.5 Power Spectral Density

Once the power signals of the HESS are generated through simulations in Ch. 4, signal processing
is used to analyze the relative effectiveness of the SESS at absorbing high frequency components

18
from the HESS. Fourier analysis, which is the decomposition of a time series signal into a sum
of sinusoidal components of different frequencies as explained by Bloomfield [15], can be used
to show the magnitude of various frequencies demanded of the HESS. The nonparametric power
spectral density (PSD) of the SESS and the BESS can be obtained by treating the demand of
HESS signal as a deterministic signal and using the Fourier Transform, which can be done in
Matlab using the Fast Fourier Transform (FFT) command, to convert the signal from the time
domain to the frequency domain. The nonparametric PSD estimate is then calculated as shown
in Eq. (3.7), (3.8), and (3.9). The PSD signal’s amplitude is a scaled factor multiplied by the
absolute square of the FFT. Because the HESS signal in the frequency domain is real-valued and
symmetric, only half of the power estimates need to be calculated and can then be multiplied by
2, to conserve the total power. The exceptions to this are for the zero frequency 0Hz and the
Nyquist frequency N2 Hz shown in Eq. (3.7) and (3.8), which are not repeated and therefore


don’t need to be multiplied by 2 [16]. N is the length of the signal in the time domain. The
Fs Fs
frequency range of the signal is from 0Hz to 2
in steps of N
.

1
P SD (0Hz) = × |x (0Hz)|2 (3.7)
Fs × N
   2
N 1 N
P SD Hz = × x Hz (3.8)
2 Fs × N 2
    2
N 2 N
P SD 0Hz : Hz = × x 0Hz : Hz (3.9)
2 Fs × N 2

Spectrogram analysis is used to analyze the PSD over specified intervals. This allows
for analysis of the change in magnitudes of discrete frequencies by applying Short-Time Fourier
Transform (STFT) to the signal using a specified windowing method. The spectrogram analysis
that will be presented in Ch. 4 will use the Kaiser window of length 256 samples and shape
parameter β = 5, contain 220 samples of section-to-section overlap, 512 discrete Fourier transform
(DFT) points, and a sampling frequency (fs ) of 40 Hz. The sampling frequency is derived from
Eq. (3.10) observing a one hour dispatching period.

19
1
fs = 144000samples/hour × hour/sec (3.10)
3600
= 40samples/sec

= 40Hz

20
CHAPTER 4: RESULTS

4.1 One-Hour Detailed Analysis

The simulation model shown in Fig. 4.1 is used in Simulink to demonstrate the ability of the
system to dispatch solar power for one dispatching period on June 9th, 2015 from 11:00 (11 AM)
to 12:00 (12 PM). The system is designed based on the content mentioned in Ch. 3. The PVES,
DC-Link, GCC, and Utility Grid models originated from the 100kW grid-connected PV array
example from Giroux et. al [17].

Figure 4.1: Solar Farm with HESS Matlab Simulink Model

The simulation uses the irradiance and temperature as mentioned in Section 3.2 and is
shown in Fig. 4.2. PGrid,est level as mentioned in Section 3.3 is calculated prior to the start of the
simulation using the given solar data. The average irradiance, shown in Fig. 4.3, is multiplied
by the average efficiency determined by the average temperature, shown in Fig. 4.4 to provide
PGrid,est . The one-hour simulation does not account for factoring the 0.95 coefficient mentioned
in Section 3.3 or any adjustment to the estimate during the simulation so PGrid,est = PGrid,ref and
is calculated as shown in Eq. (4.1).

21
Figure 4.2: Solar Data for June 9th, 2015 from 11:00 to 12:00 [2]

Figure 4.3: Interpolated Plot of MPP’s for PV array at 25◦ C [2]

PGrid,ref = 76.16kW × 97.7% = 74.4535kW (4.1)

The results in Fig. 4.5 show accurate dispatching for the entire dispatching period, besides
initial transients. The PP V ES signal appears to be thick in some places during the dispatching
period as a result of oscillations around the MPP caused by the IncCond algorithm. The PGrid
signal is almost completely flat and maintains an error of about 0.6% calculated by Eq. (4.2).

22
Figure 4.4: Interpolated plot of MPP’s for PV array at 1kW/m2 [2]

Figure 4.5: PVES, HESS, and Grid Power for June 9th, 2015 from 11:00 to 12:00 [2]

PGrid,ref − PGrid
Error(%) = × 100 (4.2)
PGrid,ref

Using spectrogram analysis of the HESS, as mentioned in Section 3.5, it is revealed that
the SESS absorbs the high frequency components of the HESS. The spectrogram of the HESS is
shown in Fig. 4.6 and contains large magnitudes of both high and low frequency components. By
comparing the magnitudes of high frequency components from the spectrogram of the SESS in

23
Figure 4.6: Spectrogram Analysis of HESS for June 9th, 2015 from 11:00 to 12:00

Figure 4.7: Spectrogram Analysis of SESS for June 9th, 2015 from 11:00 to 12:00

Fig. 4.7 to the spectrogram of the BESS in Fig. 4.8, the observation of absorption by the SESS of
high frequency components can be made. Conversely, the spectrogram of the BESS shows that
most of the low frequency components of the HESS are absorbed by the BESS because of the
first-order low pass filter.

24
Figure 4.8: Spectrogram Analysis of BESS for June 9th, 2015 from 11:00 to 12:00

4.2 Full Day Dispatching

The simulation model from Fig. 4.1 is used again to demonstrate the ability of the system to
dispatch solar power for 15 consecutive hours, from sunrise to sunset. The simulation uses the
irradiance and temperature as mentioned in Section 3.2 from June 9th, 2015 from 5:00 (5 AM) to
20:00 (8 PM) and is shown in Fig. 4.9. PGrid,est as mentioned in Section 3.3 is calculated prior to
the start of the simulation using the given solar data and is shown in Fig. 4.10.

The reference power for the system PGrid,ref is an adjusted value of the PGrid,est made during
the simulation as mentioned in Section 3.3. The output from the system PGrid and PGrid,ref are
shown in Fig. 4.11. The error, measured in %, of PGrid from PGrid,ref is measured by the equation
|PGrid,ref −PGrid |
Error(%) = PGrid,ref
and is shown in Fig. 4.12. During peak hours of the day the error is
below 1% and during non-peak hours the error is below 16%.

The other power profiles observed through simulation are from the PVES (PP V ES ), BESS
(PBESS ), and SESS (PSESS ). Their power outputs, along with the dispatched power PGrid are
shown in Fig. 4.13. The thicker part of PP V ES is a direct result of the IncCond MPPT algorithm
as mentioned in Section 2.3.

Observing the SOC of the BESS show that the adjustments made to PGrid,est were effective.
Consistency of the capacity available from the BESS at the start of each dispatching period is

25
Figure 4.9: Solar Data for June 9th, 2015 from 5:00 to 20:00 [3]

Figure 4.10: PGrid,est for June 9th, 2015 from 5:00 to 20:00

vital to its reliability. The SOC of the BESS for June 9th, 2015 from 5:00 to 20:00 is shown in
Fig. 4.14.

Some further investigation into the power profile of the BESS revealed that the minimum

26
Figure 4.11: Dispatched Power in Comparison to it’s Reference for June 9th, 2015 from 5:00 to
20:00

Figure 4.12: Error of Dispatched Power for June 9th, 2015 from 5:00 to 20:00

capacity required of the lead-acid battery bank to be appropriately functioning component of the
solar dispatching system. First, the absolute maximum amount of energy, measured in kW hr,
used by the BESS during each dispatching period is calculated and compared amongst the other

27
Figure 4.13: PVES, HESS, and Grid Power for June 9th, 2015 from 5:00 to 20:00

Figure 4.14: BESS SOC for June 9th, 2015 from 5:00 to 20:00

periods’ maximum energies by integrating the power curve over one hour. The maximum of these
maximums is the minimum amount of total energy capacity the lead-acid battery bank can be,
i.e. oversizing the lead-acid battery bank is any capacity greater than the M inimumEnergyBESS .

28
The energy in kW hr used by the BESS is shown in Fig. 4.15.

Figure 4.15: BESS Energy used for June 9th, 2015 from 5:00 to 20:00

The absolute maximum amount of energy used by the BESS over all dispatching periods
is 8.956kW hr. However, because the DOD of the lead-acid battery bank is 40% the minimum
amount of capacity required is 8.956kW hr from 100% SOC to 80% SOC and 8.956kW hr from 80%
SOC to 60% SOC. This results in the minimum capacity sizing for the BESS to be ≈ 45kW hr.
The size of the BESS used in this simulation was 50kW hr.

An attempt at solving for the optimum size of the SESS was made by first finding the
maximum amount of energy, in terms of kW hr, required of the SESS by integrating the power
profile over each dispatching period. The integration method used on the SESS is the same as
the one used to calculate the minimum capacity needed for the BESS. The maximum amount
of energy used by the SESS was 2.2935kW hr and is therefore the minimum amount of energy
capacity required for the SESS to have. Next, to relate the energy of a capacitor to some capacity
measured in Farads, the conversion from kW hr to Joules is calculated using Eq. (4.3) and can
then be used in Eq. (4.4) to be converted to Farads. V in Eq. (4.4) is set to 216V , which is
assumed to be an SOC for the SESS of 80%.

29
Energy (Joules) = Energy (kW h) × 3.6e6 (4.3)

M inimum EnergySESS = 2.2935 kW h × 3.6e6

M inimum EnergySESS = 8.2566e6 Joules

2 × Energy (Joules)
Capacity (F arads) = (4.4)
(V )2
2 × 8.2566e6 Joules
M inimum CapacitySESS =
(216V )2
M inimum CapacitySESS ≈ 352 F arads

A simulation using the SESS with a nominal voltage of 270V and a capacitance of 352F ,
resulted with a failure of the supercapacitor bank to maintain enough charge to successfully
complete the dispatching period. Therefore, a capacitance of 700F was used for the successful
simulation presented in this section. Further research should be done into properly calculating
the optimal size of the SESS to create an optimally sized HESS for solar power dispatching.

As mentioned in Section 2.3, mitigation of high frequency components and the number of
charge/discharge cycles in the BESS will help to improve the lifespan of the lead-acid battery bank.
By running the same system mentioned earlier in this section without the SESS, a comparison
can be done to determine the magnitude of mitigation to the number of charge/discharge cycles
by the BESS without the SESS to absorb the high frequency components of the HESS. With the
SESS present the BESS encountered 77 charge/discharge cycles. Without the SESS the BESS
encountered 119 charge/discharge cycles. The results were a 45% reduction in charge/discharge
cycles with the SESS included in the HESS.

30
CHAPTER 5: CONCLUSION AND FUTURE WORK

In conclusion, the HESS provided the necessary power to provide a constant and reliable
renewable power source from intermittent solar power. Also, the integrated supercapacitor bank to
the HESS provided a relief to the lead-acid battery bank by absorbing high frequency components
and mitigating the number of charge/discharge cycles. The optimization of sizing to the BESS
could prove helpful in the future of designing affordable and reliable energy storage systems for
solar power.

The minimum capacity size the BESS in this system was found to be a lead-acid battery
bank with the nominal voltage of 250V and 200Ahr. However, size optimization should be done
for SESS in future work. The progress made towards an optimal size calculation for the SESS is
mentioned in Section 4.2 and could be a good start for further research into size optimization of the
HESS for solar power dispatching. Optimizing the size of the SESS would allow this research to
become feasible with regards to being able to perform cost analysis of the system. Cost analysis
would include return on investment (ROI) analysis to validate or reject the hypothesis that a
HESS consisting of lead-acid batteries and supercapacitors is an effective method to reduce long
term costs of dispatching solar power through an HESS.

Furthermore, obeying charging and discharging rate requirements are essential to optimize
the efficiency of the storage systems. Future work may also include implementing a three stage
battery charging mechanism to charge the lead-acid battery [18]. This advanced charging system,
known as Double Float Charging System is intended to prolong the lifespan and efficiency of the
battery. The first stage (Constant Current) charges the battery at a constant current, allowing
the voltage to rise, until the SOC reaches 70%. The second stage (Constant Voltage) charges the
battery at a constant voltage at the voltage level reached at the end of the first charging state,
allowing the current to decrease, until the SOC reaches 90%. The third stage (Float Charge)
compensates for self-discharge of the battery by pulsing small amounts of current into the battery
maintaining an SOC between 91% and 100%. It should be noted that although implementing
this charging method would increase the lifespan of the battery bank, it would also increase the

31
required capacity size of the supercapacitor bank and therefore would significantly increase the
cost of the HESS.

32
BIBLIOGRAPHY

[1] S. Y. Kan, M. Verwaal, and H. Broekhuizen, “The use of battery-capacitor combinations in


photovoltaic powered products,” J. Power Sources, vol. 162, no. 2, pp. 971–974, 11 2006.

[2] J. Chaires, H. B. Karayaka, Y. Yan, and P. Gardner, “Solar farm hourly dispatching us-
ing supercapacitor and battery system,” in Clemson University Power Systems Conference
(PSC) 2016 sponsored by IEEE, 2016.

[3] C. Maxey and A. Andreas, “Rotating shadowband radiometer (rsr),” Tech. Rep. NREL
Report No. DA-5500-56512, Oak Ridge National Laboratory (ORNL), Oak Ridge, Tennessee
(Data), 2007, http://dx.doi.org/10.5439/1052553.

[4] F. Ongaro, S. Saggini, and P. Mattavelli, “Li-ion battery-supercapacitor hybrid storage


system for a long lifetime, photovoltaic-based wireless sensor network,” IEEE Transactions
on Power Electronics, vol. 27, no. 9, pp. 3944–3952, Sept 2012.

[5] S. Teleke, M. E. Baran, S. Bhattacharya, and A. Q. Huang, “Rule-based control of bat-


tery energy storage for dispatching intermittent renewable sources,” IEEE Transactions on
Sustainable Energy, vol. 1, no. 3, pp. 117–124, Oct 2010.

[6] Y. Ru, J. Kleissl, and S. Martinez, “Storage size determination for grid-connected photo-
voltaic systems,” IEEE Transactions on Sustainable Energy, vol. 4, no. 1, pp. 68–81, Jan
2013.

[7] S. Teleke, M. E. Baran, A. Q. Huang, S. Bhattacharya, and L. Anderson, “Control strate-


gies for battery energy storage for wind farm dispatching,” IEEE Transactions on Energy
Conversion, vol. 24, no. 3, pp. 725–732, Sept 2009.

[8] S. Yam Prasad, B. Bimal Chhetri, B. Adhikary, and D. Bista, “Microcontroller based in-
telligent dc/dc converter to track maximum power point for solar photovoltaic module,”
in Innovative Technologies for an Efficient and Reliable Electricity Supply (CITRES), 2010
IEEE Conference on, Sept 2010, pp. 94–101.

33
[9] M. Jazayeri, S. Uysal, and K. Jazayeri, “Evaluation of maximum power point tracking tech-
niques in pv systems using matlab/simulink,” in Green Technologies Conference (GreenTech),
2014 Sixth Annual IEEE, April 2014, pp. 54–60.

[10] B. Wu, F. Zhuo, F. Long, W. Gu, Y. Qing, and Y. Liu, “A management strategy for solar
panel - battery - super capacitor hybrid energy system in solar car,” in Power Electronics
and ECCE Asia (ICPE ECCE), 2011 IEEE 8th International Conference on, May 2011, pp.
1682–1687.

[11] A. Fahad, T. Soyata, T. Wang, G. Sharma, W. Heinzelman, and K. Shen, “Solarcap: Super
capacitor buffering of solar energy for self-sustainable field systems,” in SOC Conference
(SOCC), 2012 IEEE International, Sept 2012, pp. 236–241.

[12] Huiying Zheng, Shuhui Li, Chuanzhi Zang, and Weijian Zheng, “Coordinated control for grid
integration of pv array, battery storage, and supercapacitor,” in Power and Energy Society
General Meeting (PES), 2013 IEEE, July 2013, pp. 1–5.

[13] Ned Mohan, Power electronics: a first course, chapter 3, p. 67, Wiley, Hoboken, NJ, 2012.

[14] K. F. Hussein, I. Abdel-Qader, and M. K. Hussain, “Hybrid fuzzy pid controller for buck-
boost converter in solar energy-battery systems,” in Electro/Information Technology (EIT),
2015 IEEE International Conference on, May 2015, pp. 070–075.

[15] Peter Bloomfield, Fourier analysis of time series: an introduction, Wiley, 2 edition, 2000.

[16] “Power spectral density estimates using fft,” http://www.mathworks.com/help/signal/ug/


psd-estimate-using-fft.html?refresh=true, 2016.

[17] Pierre Giroux, Gilbert Sybille (Hydro-Quebec, IREQ), Carlos Osorio, and Shri-
pad Chandrachood (The Mathworks), “Average model of a 100-kw grid-
connected pv array,” http://www.mathworks.com/help/physmod/sps/examples/
average-model-of-a-100-kw-grid-connected-pv-array.html?searchhighlight=
modelofa100-kwgrid-connectedpvarray, 2015.

34
[18] T. Islam and M. A. Awal, “Efficient load and charging method for solar powered home light-
ing system of bangladesh,” in Developments in Renewable Energy Technology (ICDRET),
2014 3rd International Conference on the, May 2014, pp. 1–3.

35
Appendix

36
APPENDIX A: SOURCE CODE

1 clc; clear all;


2 %% Pre-Simulation Code
3 % 15-Hour Dispatch
4 % 05:00 (5AM) to 20:00 (8PM) on June 9th, 2015
5
6 STH = 15; % SimTime in hours
7 ST = 3600*STH; % 3600s = 60mins = 1hr, 30hrs = 108000
8
9 % Step 1: Input Actual Irradiance and Temperature Data
10 % Step 2: Interpolate Data
11 % Step 3: Find Average Irradiance and Temperature
12 % Step 4: Plot Irradiation and Temperature
13 % Step 5: Estimate Average PV Output Power
14 % Step 6: Clear Unnecessary Variables
15 % Misc: Data Source Information
16
17
18 %% Step 1: Input Actual Irradiance and Temperature
19
20 % Irradiance (Ir) measured in W/mˆ2 was sampled every minute
21 Ir = [...] % Insert Irradiance from ORNL
22 % Time axis of Ir (Irt) is converted from mins to secs
23 Irt = 0:60:ST;
24
25 % Temperature (Temp) measured in degrees C was sampled every minute
26 Temp = [...] % Insert Temperature from ORNL
27 % Time axis of Temp (Tempt) is converted from mins to secs
28 Tempt = 0:60:ST;
29

30 % Irradiance data and time saved as structure


31 Irradiance.signals.values = Ir';
32 Irradiance.time = Irt';
33 save('Irradiance.mat','Irradiance');
34
35 % Temperature data and time saved as structure
36 Temperature.signals.values = Temp';
37 Temperature.time = Tempt';
38 save('Temperature.mat','Temperature');
39
40
41 %% Step 2: Interpolate Data
42 t2 = 0:0.5:ST;
43 SpHr = (1/(0.5))*60*60;
44
45 % Interpolate (Connect missing data points) of original Ir data to new time ...
axis
46 Ir2 = interp1(Irt,Ir,t2,'cubic');
47 Irradiance Interp.signals.values = Ir2';
48 Irradiance Interp.time = t2';

37
49 save('Irradiance Interp.mat','Irradiance Interp');
50

51 % Interpolate (Connect missing data points) of original Temp data to new ...
time axis
52 Temp2 = interp1(Tempt,Temp,t2,'cubic');
53 Temperature Interp.signals.values = Temp2';
54 Temperature Interp.time = t2';
55 save('Temperature Interp.mat','Temperature Interp');
56
57
58 %% Step 3: Find Average Irradiance and Temperature
59
60 % Irradiation
61 Ir Avg(1) = mean(Ir2(1,SpHr+1));
62 for i = 2:STH
63 Ir Avg(i) = mean(Ir2((i-1)*SpHr+2:i*SpHr+1));
64 end
65
66 % Temperature
67 Temp Avg(1) = mean(Temp2(1,SpHr+1));
68 for i = 2:STH
69 Temp Avg(i) = mean(Temp2((i-1)*SpHr+2:i*SpHr+1));
70 end
71
72
73 %% Step 4: Estimate Average PV Output Power
74 % Based on Solar Cell Characteristics in Matlab Simulink
75
76 % Irradation versus Power Model
77 Irr Model = [0 250 500 750 1000]; % x = Irr Model
78 Irr Power Model = [0 22.68 48.75 74.25 100.73]; % y = Irr Power Model
79 Irr Model interp = 0:0.01:1000; % xx = Irr Model interp
80 Irr Power Model interp = spline(Irr Model,Irr Power Model,...
81 Irr Model interp); % yy = Irr Pow Model interp
82
83 % Temperature versus Efficiency Model
84 Temp Model = [0 25 50 75 100]; % x = Temp Model
85 Temp Power Model = [1.1 1.0 0.85 0.75 0.65]; % y = Temp Power Model
86 Temp Model interp = 0:0.01:100; % xx = Temp Model interp
87 Temp Power Model interp = spline(Temp Model,Temp Power Model,...
88 Temp Model interp); % yy = Irr Pow Model interp
89
90 % Estimate Average PV Output Power
91 for i = 1:STH
92 P(i) = Irr Power Model interp(round(length(Irr Power Model interp)...
93 * Ir Avg(i)/Irr Model interp(end)));
94 T(i) = Temp Power Model interp(round(length(Temp Power Model interp)...
95 *Temp Avg(i)/Temp Model interp(end)));
96 P Grid Est(i) = 0.95*P(i)*T(i);
97 end
98 save('P Grid Est.mat','P Grid Est');
99
100
101 %% Step 6: Clear Unnecessary Variables
102 clc; clear all;
103 load('P Grid Est.mat');

38
104 load('Irradiance.mat');
105 load('Temperature.mat');
106
107
108 %% Misc: Source Information
109 % Oak Ridge National Laboratory (ORNL)
110 % Rotating Shadowband Radiometer (RSR)
111 % Oak Ridge, Tennessee

39
1 %% Grid Reference Power Factor
2
3 function mult = fcn(SOC)
4
5 if SOC ≤ 100 && SOC > 92
6 mult = 1.1;
7 elseif SOC ≤ 92 && SOC > 84
8 mult = 1.05;
9 elseif SOC ≤ 84 && SOC > 76
10 mult = 1.00;
11 elseif SOC ≤ 76 && SOC > 68
12 mult = 0.95;
13 elseif SOC ≤ 68 && SOC ≥ 60
14 mult = 0.90;
15 else
16 mult = 1.00;
17 end
18
19 end

40
1 %% IncCond MPPT
2
3 function D = IncCond(Param, Enabled, V, I)
4
5 % MPPT controller based on the Incremental Conductance algorithm.
6
7 % D output = Duty cycle of the boost converter (value between 0 and 1)
8 %
9 % Enabled input = 1 to enable the MPPT controller
10 % V input = PV array terminal voltage (V)
11 % I input = PV array current (A)
12 %
13 % Param input:
14 Dinit = Param(1); %Initial value for D output
15 Dmax = Param(2); %Maximum value for D
16 Dmin = Param(3); %Minimum value for D
17 ∆D = Param(4); %Increment value used to increase/decrease the duty cycle D

18 % ( increasing D = decreasing Vref )


19 %
20
21 persistent Vold Iold Dold;
22
23 dataType = 'double';
24
25 if isempty(Vold)
26 Vold=0;
27 Dold=Dinit;
28 Iold=0;
29 end
30
31 dV = V - Vold;
32 dI = I - Iold;
33
34 if dV 6= 0 && Enabled 6=0
35 if dI/dV 6= (-1*I/V)
36 if dI/dV < (-1*I/V)
37 D = Dold - ∆D;
38 else
39 D = Dold + ∆D;
40 end
41 else
42 D = Dold;
43 end
44 else
45 if dI 6= 0
46 if dI > 0
47 D = Dold + ∆D;
48 else
49 D = Dold - ∆D;
50 end
51 else
52 D = Dold;
53 end
54 end
55
56 if D ≥ Dmax | | D ≤ Dmin

41
57 D = Dold;
58 end
59
60 Dold = D;
61 Vold = V;
62 Iold = I;

42
1 %% Rule Based DOD for BESS
2
3 function y = fcn(SOC,u)
4
5 if u ≥ 0 % Discharge
6 if SOC > 60
7 y = u;
8 else
9 y = 0;
10 end
11 else % u < 0 = Charge
12 if SOC < 100
13 y = u;
14 else
15 y = 0;
16 end
17 end
18
19 end

43
1 %% POST-SIMULATION CODE
2 % 15-Hour Dispatch
3 % 05:00 (5AM) to 20:00 (8PM) on June 9th, 2015
4
5 D Hours = 15;
6
7 %% Save
8 save('Power.mat','P Out','P PVES','P BESS','P SESS','P Grid Ref',...
9 'P Grid Ref Factor');
10 save('Battery.mat','Bat V','Bat I','Bat SOC');
11 save('SC.mat','SC V','SC I','SC SOC');
12 save('Duty.mat','OMD BESS','OMD SESS');
13 TM = 0:D Hours/(length(Time)-1):D Hours;
14 TM2 = 0:D Hours/(length(Irradiance.time)-1):D Hours;
15 save('Time.mat','Time','TM','TM2');
16 save('Grid Ref.mat','P Grid Est','P Grid Ref Factor','P Grid Ref');
17

18 Error = P Grid Ref - P Out;


19 ErrorP = ((P Grid Ref - P Out)./(P Grid Ref)).*100;
20 save('Error.mat','Error','ErrorP');
21
22 %% Load
23 % load('Power.mat');
24 % load('Battery.mat');
25 % load('SC.mat');
26 % load('Duty.mat');
27 % load('Time.mat');
28 % load('Grid Ref.mat');
29 % load('Error.mat');
30
31
32 %% Step 1: Plot Output Power
33 figure(1)
34 plot(TM,P PVES,TM,P BESS,TM,P SESS,TM,P Grid Ref,TM,P Out,'LineWidth',1);
35 xlabel('Time (Hours)','FontSize',24); ylabel('Power (kW)','FontSize',26);
36 legend('P {Grid,Ref}','P {Grid}','P {PVES}','P {BESS}','P {SESS}'...
37 ,'FontSize',18);
38 set(gca,'fontsize',18)
39 grid on;
40
41

42 %% Step 2: Plot Battery Characteristics (Voltage, Current, and SOC)


43 figure(2)
44 subplot(311);
45 plot(TM,Bat V);
46 title('Battery: Voltage');
47 xlabel('Time (Hours)','FontSize',24); ylabel('Voltage (V)','FontSize',26);
48 set(gca,'fontsize',18)
49 grid on;
50
51 subplot(312);
52 plot(TM,Bat I);
53 title('Battery: Current');
54 xlabel('Time (Hours)','FontSize',24); ylabel('Current (A)','FontSize',26);
55 set(gca,'fontsize',18)
56 grid on;

44
57
58 subplot(313);
59 plot(TM,Bat SOC);
60 title('Battery: SOC');
61 xlabel('Time (Hours)','FontSize',24); ylabel('SOC (%)','FontSize',26);
62 set(gca,'fontsize',18)
63 grid on;
64

65
66 %% Step 3: Plot SC Characteristics (Voltage, Current, and SOC)
67 figure(3)
68 subplot(311);
69 plot(TM,SC V);
70 title('SC: Voltage');
71 xlabel('Time (Hours)','FontSize',24); ylabel('Voltage (V)','FontSize',26);
72 set(gca,'fontsize',18)
73 grid on;
74
75 subplot(312);
76 plot(TM,SC I);
77 title('SC: Current');
78 xlabel('Time (Hours)','FontSize',24); ylabel('Current (A)','FontSize',26);
79 set(gca,'fontsize',18)
80 grid on;
81
82 subplot(313);
83 plot(TM,SC SOC);
84 title('SC: SOC');
85 xlabel('Time (Hours)','FontSize',24); ylabel('SOC (%)','FontSize',26);
86 set(gca,'fontsize',18)
87 grid on;
88

89
90 %% Step 4: Plot Error
91 figure(4)
92 plot(TM,ErrorP);
93 title('Error');
94 xlabel('Time (Hours)','FontSize',24); ylabel('Error (%)','FontSize',26);
95 set(gca,'fontsize',18)
96 grid on;
97
98
99 %% Step 5: Plot one min D
100 figure(5)
101 subplot(211)
102 plot(TM,OMD BESS);
103 title('Battery Duty Ratio');
104 xlabel('Time (Hours)','FontSize',24); ylabel('1-D','FontSize',24);
105 set(gca,'fontsize',18)
106 grid on;
107
108 subplot(212)
109 plot(TM,OMD SESS);
110 title('SC Duty Ratio');
111 xlabel('Time (Hours)','FontSize',24); ylabel('1-D','FontSize',26);
112 set(gca,'fontsize',18)

45
113 grid on;
114

115
116 %% Step 6: Plot Grid Reference Power
117 figure(6)
118 plot(TM,P Grid Est,'*-',TM,P Grid Ref,'LineWidth',2);
119 title('Grid Reference Power');
120 xlabel('Time (Hours)','FontSize',24); ylabel('Power (kW)','FontSize',26);
121 legend('P {Grid,Est}','P {Grid,Ref}','FontSize',18);
122 set(gca,'fontsize',18)
123 grid on;
124
125
126 %% Step 7: Plot Irradiation and Temperature
127 figure(7)
128 [ax,p1,p2] = plotyy(TM2,Irradiance.signals.values,TM2...
129 ,Temperature.signals.values,'plot'); % Plot Ir2 and Temp2 on same graph
130 ylabel(ax(1),'Irradiance (W/mˆ2)'); % y1-axis = Irradiance
131 ylabel(ax(2),'Temperature (C)'); % y2-axis = Temperature
132 legend('Irradiance (W/mˆ2)','Temperature (C)');
133 set(gca,'fontsize',18)
134 grid on;
135 title('Irradiation and Temperature');
136 xlabel(ax(1),'Time (Hours)'); % x-axis = time

46
1 %% Capacity Requirements for Hybrid Energy Storage System
2
3 %% Table of Contents
4 % Initial Parameters
5 % Section 1: HESS Capacity
6 % Figure 1: HESS Capacity vs. Time
7 % Section 2: BESS Capacity
8 % Figure 2: BESS Capacity vs. Time
9 % Section 3: SESS Capacity
10 % Figure 3: SESS Capacity vs. Time
11

12 %% Initial Parameters
13 clc; clear all; close all;
14 load('Power.mat'); load('Time.mat');
15
16 Total Hours = 15;
17

18 Time mins = 0:round(Time(end)/60)/(length(Time)-1):round(Time(end)/60);


19 P HESS = P Out - P PVES;
20
21 %% Section 1: HESS Capacity
22 % Integrate
23 N = (length(P HESS)-1)/Total Hours;
24
25 for i = 0:Total Hours-1
26 k = 1 + i*(length(P Out)-1)/Total Hours; % starting point of integration
27
28 sum(k) = P HESS(k)/N;
29 for j = k+1:k+N-1
30 sum(j) = sum(j-1) + P HESS(j)/N;
31 end
32 sum(k+N) = sum(k+N-1) + P HESS(j)/N;
33
34 bounds(i+1,:) = [abs(min(sum(k:k+N))) abs(max(sum(k+N)))];
35 HESS Capacity(i+1) = max(bounds(i+1,:));
36 end
37
38 % Figure 1: HESS Capacity vs. Time
39 figure(1)
40 [ax,p1,p2] = plotyy(HOD,P HESS,HOD,sum); % Plot Ir2 and Temp2 on same graph
41 xlabel(ax(2),'Time (Hour of Day)'); % x-axis = time
42 ylabel(ax(1),'HESS Power (kW)'); % y1-axis = Irradiance
43 ylabel(ax(2),'HESS Capacity (kW/Hour)'); % y2-axis = Temperature
44 p1.LineWidth = 2; % Irradiance line is width = 2
45 p2.LineWidth = 2; % Temperature line is width = 2
46 set(ax(1),'YLim',[-50 50]);
47 set(ax(1),'YTick',[-50:10:50]);
48 set(ax(1),'fontsize',14);
49 set(ax(2),'YLim',[-10 10]);
50 set(ax(2),'YTick',[-10:2:10]);
51 set(ax(2),'fontsize',14);
52 legend('HESS Power (kW)','HESS Capacity Calculated (kW/Hour)');
53 grid on;
54 title('HESS Power and Capacity');
55
56

47
57 %% Section 2: BESS Capacity
58 % Integrate
59 N = (length(P BESS)-1)/Total Hours;
60
61 for i = 0:Total Hours-1
62 k = 1 + i*N; % starting point of integration
63
64 sum(k) = P BESS(k)/N;
65 for j = k+1:k+N-1
66 sum(j) = sum(j-1) + P BESS(j)/N;
67 end
68 sum(k+N) = sum(k+N-1) + P BESS(j)/N;
69
70 bounds(i+1,:) = [abs(min(sum(k:k+N))) abs(max(sum(k+N)))];
71 BESS Capacity(i+1) = 5*max(bounds(i+1,:));
72 end
73
74 % Figure 2: BESS Capacity vs. Time
75 figure(2)
76 [ax,p1,p2] = plotyy(HOD,P BESS,HOD,sum); % Plot Ir2 and Temp2 on same graph
77 xlabel('Time (Hour of Day)'); % x-axis = time
78 ylabel(ax(1),'BESS Power (kW)'); % y1-axis = Irradiance
79 ylabel(ax(2),'BESS Capacity (kW/Hour)'); % y2-axis = Temperature
80 p1.LineWidth = 2; % Irradiance line is width = 2
81 p2.LineWidth = 2; % Temperature line is width = 2
82 set(ax(1),'YLim',[-50 50]);
83 set(ax(1),'YTick',[-50:10:50]);
84 set(ax(1),'fontsize',18);
85 set(ax(2),'YLim',[-10 10]);
86 set(ax(2),'YTick',[-10:2:10]);
87 set(ax(2),'fontsize',18);
88 legend('BESS Power (kW)','BESS Capacity Calculated (kW/Hour)');
89 grid on;
90 % title('BESS Power and Capacity');
91
92
93 %% Section 3: SESS Capacity
94 % Integrate
95 N = (length(P SESS)-1)/Total Hours;
96
97 for i = 0:Total Hours-1
98 k = 1 + i*N; % starting point of integration
99
100 sum(k) = P SESS(k)/N;
101 for j = k+1:k+N-1
102 sum(j) = sum(j-1) + P SESS(j)/N;
103 end
104 sum(k+N) = sum(k+N-1) + P SESS(j)/N;
105
106 bounds(i+1,:) = [abs(min(sum(k:k+N))) abs(max(sum(k+N)))];
107 SESS Capacity(i+1) = 2*max(bounds(i+1,:));
108 end
109
110 % Figure 3: SESS Capacity vs. Time
111 figure(3)
112 [ax,p1,p2] = plotyy(HOD,P SESS,HOD,sum); % Plot Ir2 and Temp2 on same graph

48
113 xlabel(ax(2),'Time (Hour of Day)'); % x-axis = time
114 ylabel(ax(1),'SESS Power (kW)'); % y1-axis = Irradiance
115 ylabel(ax(2),'SESS Capacity (kW/Hour)'); % y2-axis = Temperature
116 p1.LineWidth = 2; % Irradiance line is width = 2
117 p2.LineWidth = 2; % Temperature line is width = 2
118 set(ax(1),'YLim',[-50 50]);
119 set(ax(1),'YTick',[-50:10:50]);
120 set(ax(1),'fontsize',14);
121 set(ax(2),'YLim',[-10 10]);
122 set(ax(2),'YTick',[-10:2:10]);
123 set(ax(2),'fontsize',14);
124 legend('SESS Power (kW)','SESS Capacity Calculated (kW/Hour)');
125 grid on;
126 title('SESS Power and Capacity');
127
128
129 %% Section 4: Output Results
130 fprintf('HESS required capacity is: %g kW/hr \n',max(HESS Capacity));
131
132 fprintf('If BESS starts at an SOC of 80%%,\n');
133 fprintf('then the minimum required capacity is: %g kW/hr ...
\n',max(BESS Capacity));
134
135 fprintf('If SESS starts at an SOC of 50%%,\n');
136 fprintf('then the minimum required capacity is: %g kW/hr ...
\n',max(SESS Capacity));

49
1 %% Compare Charge/Discharge Cycles of BESS With SESS vs. Without SESS
2 % 15-Hour Dispatch with SESS vs. without SESS
3 % 05:00 (5AM) to 20:00 (8PM) on June 9th, 2015
4
5 load('Power.mat'); load('Power Without SESS.mat'); load('Time.mat');
6
7
8 %% Charge/Discharge: WITH SESS
9 N = (length(P BESS)-1)/Total Hours;
10 Charge wSESS = zeros(1,Total Hours+1);
11 Discharge wSESS = zeros(1,Total Hours+1);
12
13 for i = 0:Total Hours-1
14 k = 1 + i*N; % starting point of integration
15
16 for j = k+1:k+N
17 if P BESS(j-1) ≤ 0 && P BESS(j) > 0
18 Charge wSESS(i+1) = Charge wSESS(i+1) + 1;
19 elseif P BESS(j-1) ≥ 0 && P BESS(j) < 0
20 Discharge wSESS(i+1) = Discharge wSESS(i+1) + 1;
21 end
22 end
23

24 end
25
26 %% Charge/Discharge: NO SESS
27 N = (length(P BESS No SESS)-1)/Total Hours;
28 Charge wSESS No SESS = zeros(1,Total Hours+1);
29 Discharge wSESS No SESS = zeros(1,Total Hours+1);
30
31 for i = 0:Total Hours-1
32 k = 1 + i*N; % starting point of integration
33
34 for j = k+1:k+N
35 if P BESS No SESS(j-1) ≤ 0 && P BESS No SESS(j) > 0
36 Charge wSESS No SESS(i+1) = Charge wSESS No SESS(i+1) + 1;
37 elseif P BESS No SESS(j-1) ≥ 0 && P BESS No SESS(j) < 0
38 Discharge wSESS No SESS(i+1) = Discharge wSESS No SESS(i+1) + 1;
39 end
40 end
41

42 end
43
44
45 TH = 0:Total Hours;
46
47 figure();
48 plot(TH,Charge wSESS,TH,Charge wSESS No SESS);
49 legend('Charges','Charges No SESS');
50 title('Charges with vs. w/out SESS')
51 xlabel('Hour'); ylabel('Number of Cycles');
52
53 figure();
54 plot(TH,Discharge wSESS,TH,Discharge wSESS No SESS);
55 legend('Discharges','Discharges No SESS');
56 title('Disharges with vs. w/out SESS')

50
57 xlabel('Hour'); ylabel('Number of Cycles');
58

59 clear sum;
60
61 CandD wSESS = sum(Charge wSESS) + sum(Discharge wSESS');
62 CandD NO SESS = sum(Charge wSESS No SESS) + sum(Discharge wSESS No SESS);

51
1 clc; clear all;
2 %% Pre-Simulation Code
3 % 1-Hour Dispatch
4 % 11:00 (11AM) to 12:00 (12:00PM) on June 9th, 2015
5

6 STH = 1; % SimTime in hours


7 ST = 3600*STH; % 3600s = 60mins = 1hr
8
9 % Step 1: Input Actual Irradiance and Temperature Data
10 % Step 2: Interpolate Data
11 % Step 3: Find Average Irradiance and Temperature
12 % Step 4: Plot Irradiation and Temperature
13 % Step 5: Estimate Average PV Output Power
14 % Step 6: Clear Unnecessary Variables
15 % Misc: Data Source Information
16
17

18 %% Step 1: Input Actual Irradiance and Temperature


19
20 % Irradiance (Ir) measured in W/mˆ2 was sampled every minute
21 Ir = [...] % Insert Irradiance from ORNL
22 % Time axis of Ir (Irt) is converted from mins to secs
23 Irt = 0:60:ST;
24
25 % Temperature (Temp) measured in degrees C was sampled every minute
26 Temp = [...] % Insert Temperature from ORNL
27 % Time axis of Temp (Tempt) is converted from mins to secs
28 Tempt = 0:60:ST;
29

30 % Irradiance data and time saved as structure


31 Irradiance.signals.values = Ir';
32 Irradiance.time = Irt';
33 save('Irradiance.mat','Irradiance');
34
35 % Temperature data and time saved as structure
36 Temperature.signals.values = Temp';
37 Temperature.time = Tempt';
38 save('Temperature.mat','Temperature');
39
40
41 %% Step 2: Interpolate Data
42 t2 = 0:0.5:ST;
43 SpHr = (1/(0.5))*60*60;
44
45 % Interpolate (Connect missing data points) of original Ir data to new
46 % time axis
47 Ir2 = interp1(Irt,Ir,t2,'cubic');
48 Irradiance Interp.signals.values = Ir2';
49 Irradiance Interp.time = t2';
50 save('Irradiance Interp.mat','Irradiance Interp');
51
52 % Interpolate (Connect missing data points) of original Temp data
53 % to new time axis
54 Temp2 = interp1(Tempt,Temp,t2,'cubic');
55 Temperature Interp.signals.values = Temp2';
56 Temperature Interp.time = t2';

52
57 save('Temperature Interp.mat','Temperature Interp');
58

59
60 %% Step 3: Find Average Irradiance and Temperature
61
62 % Irradiation
63 Ir Avg(1) = mean(Ir2(1:SpHr+1));
64 % for i = 2:STH
65 % Ir Avg(i) = mean(Ir2((i-1)*SpHr+2:i*SpHr+1));
66 % end
67
68 % Temperature
69 Temp Avg(1) = mean(Temp2(1:SpHr+1));
70 % for i = 2:STH
71 % Temp Avg(i) = mean(Temp2((i-1)*SpHr+2:i*SpHr+1));
72 % end
73
74
75 %% Step 4: Estimate Average PV Output Power
76 % Based on Solar Cell Characteristics in Matlab Simulink
77
78 % Irradation versus Power Model
79 Irr Model = [0 250 500 750 1000]; % x = Irr Model
80 Irr Power Model = [0 22.68 48.75 74.25 100.73]; % y = Irr Power Model
81 Irr Model interp = 0:0.01:1000; % xx = Irr Model interp
82 Irr Power Model interp = spline(Irr Model,Irr Power Model...
83 ,Irr Model interp); % yy = Irr Pow Model interp
84
85 % Temperature versus Efficiency Model
86 Temp Model = [0 25 50 75 100]; % x = Temp Model
87 Temp Power Model = [1.1 1.0 0.85 0.75 0.65]; % y = Temp Power Model
88 Temp Model interp = 0:0.01:100; % xx = Temp Model interp
89 Temp Power Model interp = spline(Temp Model,Temp Power Model...
90 ,Temp Model interp); % yy = Irr Pow Model interp
91
92 % Estimate Average PV Output Power
93 for i = 1:STH
94 P(i) = Irr Power Model interp(round(length(Irr Power Model interp)...
95 * Ir Avg(i)/Irr Model interp(end)));
96 T(i) = Temp Power Model interp(round(length(Temp Power Model interp)...
97 *Temp Avg(i)/Temp Model interp(end)));
98 P Grid Est(i) = 0.95*P(i)*T(i);
99 end
100 save('P Grid Est.mat','P Grid Est');
101
102
103 %% Step 6: Clear Unnecessary Variables
104 clc; clear all;
105 load('P Grid Est.mat');
106 load('Irradiance.mat');
107 load('Temperature.mat');
108
109
110 %% Misc: Source Information
111 % Oak Ridge National Laboratory (ORNL)
112 % Rotating Shadowband Radiometer (RSR)

53
113 % Oak Ridge, Tennessee

54
1 %% POST-SIMULATION CODE
2 % 1-Hour Dispatch
3 % 11:00 (11AM) to 12:00 (12:00PM) on June 9th, 2015
4
5 D Hours = 1;
6
7 %% Save
8 save('Power.mat','P Out','P PVES','P BESS','P SESS','P Grid Ref'...
9 ,'P Grid Ref Factor');
10 save('Battery.mat','Bat V','Bat I','Bat SOC');
11 save('SC.mat','SC V','SC I','SC SOC');
12 save('Duty.mat','OMD BESS','OMD SESS');
13 TM = 0:D Hours/(length(Time)-1):D Hours;
14 TM2 = 0:D Hours/(length(Irradiance.time)-1):D Hours;
15 save('Time.mat','Time','TM','TM2');
16 save('Grid Ref.mat','P Grid Est','P Grid Ref Factor','P Grid Ref');
17

18 Error = P Grid Ref - P Out;


19 ErrorP = ((P Grid Ref - P Out)./(P Grid Ref)).*100;
20 save('Error.mat','Error','ErrorP');
21
22 %% Load
23 % load('Power.mat');
24 % load('Battery.mat');
25 % load('SC.mat');
26 % load('Duty.mat');
27 % load('Time.mat');
28 % load('Grid Ref.mat');
29 % load('Error.mat');
30
31
32 %% Step 1: Plot Output Power
33 figure(1)
34 plot(TM,P Grid Ref,TM,P Out,TM,P PVES,TM,P BESS,TM,P SESS,'LineWidth',2);
35 xlabel('Time (Hours)','FontSize',24); ylabel('Power (kW)','FontSize',26);
36 legend('P {Grid,Ref}','P {Grid}','P {PVES}','P {BESS}','P {SESS}'...
37 ,'FontSize',18);
38 set(gca,'fontsize',18)
39 grid on;
40
41

42 %% Step 2: Plot Battery Characteristics (Voltage, Current, and SOC)


43 figure(2)
44 subplot(311);
45 plot(TM,Bat V);
46 title('Battery: Voltage');
47 xlabel('Time (Hours)','FontSize',24); ylabel('Voltage (V)','FontSize',26);
48 set(gca,'fontsize',18)
49 grid on;
50
51 subplot(312);
52 plot(TM,Bat I);
53 title('Battery: Current');
54 xlabel('Time (Hours)','FontSize',24); ylabel('Current (A)','FontSize',26);
55 set(gca,'fontsize',18)
56 grid on;

55
57
58 subplot(313);
59 plot(TM,Bat SOC);
60 title('Battery: SOC');
61 xlabel('Time (Hours)','FontSize',24); ylabel('SOC (%)','FontSize',26);
62 set(gca,'fontsize',18)
63 grid on;
64

65
66 %% Step 3: Plot SC Characteristics (Voltage, Current, and SOC)
67 figure(3)
68 subplot(311);
69 plot(TM,SC V);
70 title('SC: Voltage');
71 xlabel('Time (Hours)','FontSize',24); ylabel('Voltage (V)','FontSize',26);
72 set(gca,'fontsize',18)
73 grid on;
74
75 subplot(312);
76 plot(TM,SC I);
77 title('SC: Current');
78 xlabel('Time (Hours)','FontSize',24); ylabel('Current (A)','FontSize',26);
79 set(gca,'fontsize',18)
80 grid on;
81
82 subplot(313);
83 plot(TM,SC SOC);
84 title('SC: SOC');
85 xlabel('Time (Hours)','FontSize',24); ylabel('SOC (%)','FontSize',26);
86 set(gca,'fontsize',18)
87 grid on;
88

89
90 %% Step 4: Plot Error
91 figure(4)
92 plot(TM,ErrorP);
93 title('Error');
94 xlabel('Time (Hours)','FontSize',24); ylabel('Error (%)','FontSize',26);
95 set(gca,'fontsize',18)
96 grid on;
97
98
99 %% Step 5: Plot one min D
100 figure(5)
101 subplot(211)
102 plot(TM,OMD BESS);
103 title('Battery Duty Ratio');
104 xlabel('Time (Hours)','FontSize',24); ylabel('1-D','FontSize',24);
105 set(gca,'fontsize',18)
106 grid on;
107
108 subplot(212)
109 plot(TM,OMD SESS);
110 title('SC Duty Ratio');
111 xlabel('Time (Hours)','FontSize',24); ylabel('1-D','FontSize',26);
112 set(gca,'fontsize',18)

56
113 grid on;
114

115
116 %% Step 6: Plot Grid Reference Power
117 figure(6)
118 plot(TM,P Grid Est,'*-',TM,P Grid Ref,'LineWidth',2);
119 title('Grid Reference Power');
120 xlabel('Time (Hours)','FontSize',24); ylabel('Power (kW)','FontSize',26);
121 legend('P {Grid,Est}','P {Grid,Ref}','FontSize',18);
122 set(gca,'fontsize',18)
123 grid on;
124
125
126 %% Step 7: Plot Irradiation and Temperature
127 figure(7)
128 [ax,p1,p2] = plotyy(TM2,Irradiance.signals.values,TM2...
129 ,Temperature.signals.values,'plot'); % Plot Ir2 and Temp2 on same graph
130 ylabel(ax(1),'Irradiance (W/mˆ2)'); % y1-axis = Irradiance
131 ylabel(ax(2),'Temperature (C)'); % y2-axis = Temperature
132 legend('Irradiance (W/mˆ2)','Temperature (C)');
133 set(gca,'fontsize',18)
134 grid on;
135 title('Irradiation and Temperature');
136 xlabel(ax(1),'Time (Hours)'); % x-axis = time

57
1 %% Solar Power Density Analsyis
2 % Jordan Chaires
3 % December 8, 2015
4 % ET 645
5

6 %% Table of Contents
7 % Initial Parameters
8 % Section 1: Time Domain
9 % Figure 1: Power vs. Time Plot
10 % Figure 2: Histogram
11 % Section 2: HESS Frequency Domain
12 % Power Spectral Density (PSD) Analysis
13 % Integration of low frequency components of PSD
14 % Integration of high frequency components of PSD
15 % Section 3: BESS Frequency Domain
16 % Power Spectral Density (PSD) Analysis
17 % Integration of total PSD
18 % Section 4: SESS Frequency Domain
19 % Power Spectral Density (PSD) Analysis
20 % Integration of total PSD
21 % Section 5: Results
22 % Command Window: PSD for HESS, BESS, & SESS
23 % Figure 3: PSD for low frequency components of HESS, BESS, & SESS
24 % Figure 4: PSD for high frequency components of HESS, BESS, & SESS
25 % Figure 5: Spectrogram for HESS
26 % Figure 6: Spectrogram for BESS
27 % Figure 7: Spectrogram for SESS
28
29

30 %% Initial Parameters
31 clc; clear all; close all;
32 load('System Data.mat');
33
34 Ts = 0.025; % Sampling Time
35 Fs = 1/Ts; % Sampling Frequency
36 Fc = 1/60; % Cutoff Frequency - 1st Order LPF
37
38
39 %% Section 1: Time Domain
40 % Figure 1: Power vs. Time Plot
41 figure(1);
42 plot(Time mins,P HESS,'k'); hold on;
43 plot(Time mins,P BESS,'g');
44 plot(Time mins,P SESS,'r');
45 grid on
46 title('Hybrid Energy System Demand');
47 xlabel('Time (Minutes)'); ylabel('Power (kW)');
48 legend('HESS','BESS','SESS');
49
50 % Figure 2: Histogram
51 figure(2);
52 subplot(131);
53 hist(P HESS,30);
54 title('HESS Histogram')
55 xlabel('Power (kW)'); ylabel('Occurrences');
56 ylim([0,5e4]); xlim([-60 60]); grid on;

58
57
58 subplot(132)
59 hist(P BESS,30);
60 title('BESS Histogram')
61 xlabel('Power (kW)'); ylabel('Occurrences');
62 ylim([0,5e4]);xlim([-60 60]); grid on;
63
64 subplot(133)
65 hist(P SESS,30);
66 title('SESS Histogram')
67 xlabel('Power (kW)'); ylabel('Occurrences');
68 ylim([0,5e4]); xlim([-60 60]); grid on;
69
70

71 %% Section 2: HESS Frequency Domain


72 % Power Spectral Density (PSD) Analysis
73 x = P HESS;
74 N = length(x);
75 xdft = fft(x);
76 xdft = xdft(1:N/2+1);
77 psdx HESS = (1/(Fs*N)) * abs(xdft).ˆ2;
78 psdx HESS(2:end-1) = 2*psdx HESS(2:end-1);
79 freq HESS = 0:Fs/length(x):Fs/2;
80
81 % Integration of low frequency components of PSD
82 % Trapezoidal Method: Uniform Grid
83 a = 1;
84 [row,col] = find(freq HESS > Fc,1,'first');
85 b = col;
86 sum = psdx HESS(a);
87 for i = a+1:b-1
88 sum = sum + 2*psdx HESS(i);
89 end
90 sum = sum + psdx HESS(b);
91 Low Freq Power HESS = ((b-a)/(2*N))*sum;
92
93 % Integration of high frequency components of PSD
94 a = b + 1;
95 b = length(psdx HESS);
96 sum = psdx HESS(a);
97 for i = a+1:b-1
98 sum = sum + 2*psdx HESS(i);
99 end
100 sum = sum + psdx HESS(b);
101 High Freq Power HESS = ((b-a)/(2*N))*sum;
102
103
104 % Total? 3.1773e+03
105 % trapz = 1.9015e+06
106

107
108
109 %% Section 3: BESS Frequency Domain
110 % Power Spectral Density (PSD) Analysis
111 x = P BESS;
112 N = length(x);

59
113 xdft = fft(x);
114 xdft = xdft(1:N/2+1);
115 psdx BESS = (1/(Fs*N)) * abs(xdft).ˆ2;
116 psdx BESS(2:end-1) = 2*psdx BESS(2:end-1);
117 freq BESS = 0:Fs/length(x):Fs/2;
118
119 % Integration of total PSD
120 % Trapezoidal Method: Uniform Grid
121 a = 1;
122 b = length(psdx BESS);
123 sum = psdx BESS(a);
124 for i = a+1:b-1
125 sum = sum + 2*psdx BESS(i);
126 end
127 sum = sum + psdx BESS(b);
128 Power BESS = ((b-a)/(2*N))*sum;
129
130
131 %% Section 4: SESS Frequency Domain
132 % Power Spectral Density (PSD) Analysis
133 x = P SESS;
134 N = length(x);
135 xdft = fft(x);
136 xdft = xdft(1:N/2+1);
137 psdx SESS = (1/(Fs*N)) * abs(xdft).ˆ2;
138 psdx SESS(2:end-1) = 2*psdx SESS(2:end-1);
139 freq SESS = 0:Fs/length(x):Fs/2;
140
141 % Integration of total PSD
142 % Trapezoidal Method: Uniform Grid
143 a = 1;
144 b = length(psdx SESS);
145 sum = psdx SESS(a);
146 for i = a+1:b-1
147 sum = sum + 2*psdx SESS(i);
148 end
149 sum = sum + psdx SESS(b);
150 Power SESS = ((b-a)/(2*N))*sum;
151
152
153 %% Section 5: Results
154 % Command Window: PSD for HESS, BESS, & SESS
155 fprintf('HESS: \n');
156 fprintf('Low-Freq. Power Density is %g\n',Low Freq Power HESS);
157 fprintf('High-Freq. Power Density is %g\n',High Freq Power HESS);
158 fprintf('\n');
159
160 fprintf('BESS: \n');
161 fprintf('Total Power Density is %g\n',Power BESS);
162 fprintf('\n');
163
164 fprintf('SESS: \n');
165 fprintf('Total Power Density is %g\n',Power SESS);
166 fprintf('\n');
167
168

60
169 % Figure 3: PSD for low frequency components of HESS, BESS, & SESS
170 FN1 = 30; % Limit frequency range of PSD in Fig. 3
171 psd limy1 = 6e5; % Limit dB/Hz range in Fig. 3
172
173 figure(3);
174 subplot(1,3,1)
175 plot(freq HESS(1:FN1),psdx HESS(1:FN1))
176 grid on
177 title('HESS PSD (Low Freq.)')
178 xlabel('Frequency (Hz)')
179 ylabel('Power/Frequency (dB/Hz)')
180 ylim([0,psd limy1])
181
182 subplot(1,3,2)
183 plot(freq BESS(1:FN1),psdx BESS(1:FN1))
184 grid on
185 title('BESS PSD (Low Freq.)')
186 xlabel('Frequency (Hz)')
187 ylabel('Power/Frequency (dB/Hz)')
188 ylim([0,psd limy1])
189
190 subplot(1,3,3)
191 plot(freq SESS(1:FN1),psdx SESS(1:FN1))
192 grid on
193 title('SESS PSD (Low Freq.)')
194 xlabel('Frequency (Hz)')
195 ylabel('Power/Frequency (dB/Hz)')
196 ylim([0,psd limy1])
197
198
199 % Figure 4: PSD for high frequency components of HESS, BESS, & SESS
200 FN2 = 72001; % Limit frequency range of PSD in Fig. 4
201 psd limy2 = .5; % Limit dB/Hz range in Fig. 4
202
203 figure(4);
204 subplot(1,3,1)
205 plot(freq HESS(1:FN2),psdx HESS(1:FN2))
206 grid on
207 title('HESS PSD (High Freq.)')
208 xlabel('Frequency (Hz)')
209 ylabel('Power/Frequency (dB/Hz)')
210 ylim([0,psd limy2])
211
212 subplot(1,3,2)
213 plot(freq BESS(1:FN2),psdx BESS(1:FN2))
214 grid on
215 title('BESS PSD (High Freq.)')
216 xlabel('Frequency (Hz)')
217 ylabel('Power/Frequency (dB/Hz)')
218 ylim([0,psd limy2])
219
220 subplot(1,3,3)
221 plot(freq SESS(1:FN2),psdx SESS(1:FN2))
222 grid on
223 title('SESS PSD (High Freq.)')
224 xlabel('Frequency (Hz)')

61
225 ylabel('Power/Frequency (dB/Hz)')
226 ylim([0,psd limy2])
227
228
229 % Figure 5: Spectrogram for HESS
230 figure(5);
231 spectrogram(P HESS,kaiser(256,5),220,512,Fs,'power','yaxis');
232 colormap winter
233 view(-45,65)
234 title('Spectrogram of HESS');
235
236
237 % Figure 6: Spectrogram for BESS
238 figure(6);
239 spectrogram(P BESS,kaiser(256,5),220,512,Fs,'power','yaxis');
240 colormap winter
241 view(-45,65)
242 title('Spectrogram of BESS');
243
244

245 % Figure 7: Spectrogram for SESS


246 figure(7);
247 spectrogram(P SESS,kaiser(256,5),220,512,Fs,'power','yaxis');
248 colormap winter
249 view(-45,65)
250 title('Spectrogram of SESS');

62

You might also like