Problem 2.15#
Fundamentals of Solar Cells and Photovoltaic Systems Engineering
Solutions Manual - Chapter 2
Problem 2.15
Estimate the global irradiance G(α,β) reaching the plane of array (POA) of a north-facing, 20° tilted generator over grass (reflectivity \(ρ_{alb}\)=0.2) located at a PV plant in Antananarivo, Madagascar (18° 56′ 0″ S, 47° 31′ 0″ E) at midday (true solar time) on May 12, 2022.
Solve the problem using pvlib-python and the default clear-sky model.
We will use the packages pvlib, pandas and matplotlib.pyplot to plot the results.
import pvlib
import pandas as pd
import matplotlib.pyplot as plt
We start by defining the location, date and time. We will implement the calculation for every hour on May 12, 2022.
# Antananarivo, Madagascar
lat, lon = -18.93, 47.52
tz = 'Indian/Antananarivo' #existing timezones can be checked using pytz.all_timezones[::20]
date = '2022-05-12'
# surface angles beta, alpha
tilt, orientation = 20, 0 # pvlib sets orientation origin at North -> North=0
# location
location = pvlib.location.Location(lat, lon, tz=tz)
# albedo
albedo = 0.20 # grass reflectivity
# datetimes
times = pd.date_range(start=date, freq='h', periods=24, tz=tz)
We calculate the clear-sky irradiance using the default options in pvlib.
# generates clear-sky ghi, dni, dhi irradiances (decomposition using Ineichen model and turbidity index; pvlib's default)
clearsky = location.get_clearsky(times, model='ineichen')
We calculate the Sun’s coordinates and calculate the irradiance on the plane of array (POA)
# calculates Sun's coordinates
solar_position = location.get_solarposition(times=times)
# calculates POA (transposition using isotropic model)
poa_fixed_irradiance = pvlib.irradiance.get_total_irradiance(
surface_tilt=tilt,
surface_azimuth=orientation,
dni=clearsky['dni'],
ghi=clearsky['ghi'],
dhi=clearsky['dhi'],
albedo=albedo,
solar_zenith=solar_position['apparent_zenith'],
solar_azimuth=solar_position['azimuth'],
model='isotropic')
We can plot the daily evolution of direct, diffuse, and global irradiance
poa_fixed_irradiance.plot()
plt.ylabel('Irradiance [$W/m^2$]')
Text(0, 0.5, 'Irradiance [$W/m^2$]')
And obtain the value at midday.
poa_fixed_irradiance.loc['2022-05-12 12:00']
poa_global 1015.612935
poa_direct 917.173423
poa_diffuse 98.439512
poa_sky_diffuse 93.244835
poa_ground_diffuse 5.194677
Name: 2022-05-12 12:00:00+03:00, dtype: float64
We can also obtain the values at any other time step.
poa_fixed_irradiance
poa_global | poa_direct | poa_diffuse | poa_sky_diffuse | poa_ground_diffuse | |
---|---|---|---|---|---|
2022-05-12 00:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 01:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 02:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 03:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 04:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 05:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 06:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 07:00:00+03:00 | 193.627419 | 168.924254 | 24.703165 | 23.942678 | 0.760487 |
2022-05-12 08:00:00+03:00 | 479.117336 | 427.054165 | 52.063171 | 49.833871 | 2.229300 |
2022-05-12 09:00:00+03:00 | 716.583932 | 643.657557 | 72.926375 | 69.398793 | 3.527582 |
2022-05-12 10:00:00+03:00 | 891.691469 | 803.759942 | 87.931526 | 83.430202 | 4.501324 |
2022-05-12 11:00:00+03:00 | 993.550532 | 896.973748 | 96.576784 | 91.505547 | 5.071237 |
2022-05-12 12:00:00+03:00 | 1015.612935 | 917.173423 | 98.439512 | 93.244835 | 5.194677 |
2022-05-12 13:00:00+03:00 | 956.450393 | 863.029044 | 93.421350 | 88.558725 | 4.862625 |
2022-05-12 14:00:00+03:00 | 819.902753 | 738.119574 | 81.783180 | 77.683603 | 4.099576 |
2022-05-12 15:00:00+03:00 | 614.653185 | 550.614295 | 64.038890 | 61.074724 | 2.964165 |
2022-05-12 16:00:00+03:00 | 353.090633 | 312.627069 | 40.463564 | 38.904784 | 1.558780 |
2022-05-12 17:00:00+03:00 | 58.729342 | 50.030709 | 8.698633 | 8.522135 | 0.176498 |
2022-05-12 18:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 19:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 20:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 21:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 22:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
2022-05-12 23:00:00+03:00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |