, , , ,

The version 0.21 of the solaR package is now available at CRAN. This package provides a set of calculation methods of solar radiation and performance of photovoltaic systems. The package has been uploaded to CRAN under the GPL-3 license.

solaR is now able to calculate from both daily and sub-daily irradiation values. Besides, there are more changes: NEWS. Anyway, you are invited to read the introduction vignette in order to learn the most important funcionalities of solaR.

For example, the Measurement and Instrumentation Data Center of the NREL (NREL-MIDC) provides meteorological data from a variety of stations. We will try the La Ola – Lanai station at Hawaii.

We have to change the names of the columns and calculate the horizontal direct irradiation, since only the normal direct irradiation is included in the file. The datalogger program runs using Greenwich Mean Time (GMT), and data is converted to Hawaiian Standard Time (HST) after data collection. With local2Solar we can calculate the Mean Solar Time of the index.


dat <- read.zoo('NREL-Lanai.txt',
col.names = c('date', 'hour', 'G0', 'B', 'D0', 'Ta'),
index = list(1, 2),
FUN = function(d, h) as.POSIXct(paste(d, h), format = '%m/%d/%Y %H:%M', tz = 'HST'),
FUN2 = function(x) local2Solar(x, lon),
header=TRUE, sep=',')

dat$B0 <- dat$G0-dat$D0

Finally, the  object Meteo is obtained with:

NRELMeteo <- zoo2Meteo(dat, lat=lat)

With this data, a G0 object can be calculated. First, the direct and diffuse components of the data are used (corr=’none’):

g0NREL <- calcG0(lat=lat, modeRad='bdI', bdI=NRELMeteo, corr='none')

If these components were not available, a fd-kt hourly correlation is needed.. For example, we can use the model proposed by Ridley et al.:

g0BRL <- calcG0(lat=lat, modeRad='bdI', bdI=NRELMeteo, corr='BRL')

xyplot(fd~kt, data=g0BRL, pch=19, alpha=0.3, cex=0.5)

Another example: you can compare the losses of a PV system with different configurations. First, we define the irradiation and temperature conditions:

G0dm=c(2766, 3491, 4494, 5912, 6989, 7742, 7919, 7027, 5369, 3562, 2814,
Ta=c(10, 14.1, 15.6, 17.2, 19.3, 21.2, 28.4, 29.9, 24.3, 18.2, 17.2, 15.2)
prom=list(G0dm=G0dm, Ta=Ta)

Then, we can calculate the energy produced by three different PV systems with a two-axis tracker, an horizontal N-S axis tracker and a fixed system.

ProdFixed<-prodGCPV(lat=lat,prom=prom, keep.night=FALSE)
Prod2x<-prodGCPV(lat=lat, prom=prom, modeTrk='two', keep.night=FALSE)
ProdHoriz<-prodGCPV(lat=lat,prom=prom, modeTrk='horiz', keep.night=FALSE)

Last, we calculate the losses of each system and compare them:

compareLosses(ProdFixed, Prod2x, ProdHoriz)

with this result: