Learn R Programming

solaR (version 0.37)

C_TargetDiagram: Statistical analysis of a PV system with the Target Diagram

Description

In a PV plant, the individual systems are theoretically identical and their performance along the time should be the same. Due to their practical differences --power tolerance, dispersion losses, dust--, the individual performance of each system will deviate from the average behaviour. However, when a system is performing correctly, these deviations are constrained inside a range and should not be regarded as sign of malfunctioning.

If these common deviations are assumed as a random process, a statistical analysis of the performance of the whole set of systems can identify a faulty system as the one that departs significantly from the mean behaviour.

These functions compare the daily performance of each system with a reference (for example, the median of the whole set) during a time period of N days preceding the current day. They calculate a set of statistics of the performance of the PV plant as a whole, and another set of the comparison with the reference. This statistical analysis can be summarised with a graphical tool named "Target Diagram", which plots together the root mean square difference, the average difference and the standard deviation of the difference. Besides, this diagram includes the sign of the difference of the standard deviations of the system and the reference.

Usage

analyzeData(x, ref=NULL)
TargetDiagram(x, end, ndays, ref=NULL, color=NULL, cex=0.8,...)

Arguments

x
A zoo object with several columns. This object represent the time evolution of a set of units (e.g. PV generators of a large system) which are supposed to show a similar behaviour.
ref
A zoo object to be used as the reference unit. If ref=NULL (default), the reference is the median of the set.
end
A Date or POSIXct object (same class as the index of x). It defines the last day of the window to be included in the analysis.
ndays
A numeric vector, where each element is the number of days to be included in each analysis.
color
If color=NULL (default) the plot is black and white and each analysis is contained in different areas.
cex
Size of the labels.
...
Arguments to be read by xyplot.

Value

  • The result of TargetDiagram is a list with two components: [object Object],[object Object] The result of analyzeData is a list with two components: [object Object],[object Object]

encoding

UTF-8

References

  • Jolliff, J.; Kindle, J. C.; Shulman, I.; Penta, B.; Friedrichs, M. A. M.; Helber, R. & Arnone, R. A. Summary diagrams for coupled hydrodynamic-ecosystem model skill assessment Journal of Marine Systems, 2009, 76, 64-82.
  • O. Perpiñán, Statistical analysis of the performance and simulation of a two-axis tracking PV system, Solar Energy, 83:11(2074–2085), 2009.http://oa.upm.es/1843/1/PERPINAN_ART2009_01.pdf
  • Taylor, K. E. Summarizing multiple aspects of model performance in a single diagram, Program for Climate Model Diagnosis and Intercomparison, 2000,http://www-pcmdi.llnl.gov/publications/pdf/55.pdf

Examples

Run this code
library(lattice)
library(latticeExtra)

data(prodEx)

prodStat<-analyzeData(prodEx)
xyplot(prodStat$stat)
dif<-prodEx-prodStat$stat$Median;

day=as.Date('2008-8-29')

horizonplot(window(dif, start=day-90, end=day),
            origin=0, layout=c(1, 22), colorkey=TRUE, colorkey.digits=1,
            scales=list(y=list(relation="same")))

###With a external reference
ref1=apply(prodEx, 1, median, na.rm=1)
prodStat1=analyzeData(prodEx, ref=ref1)
identical(prodStat, prodStat1)

###Target Diagram

ndays=c(5, 10, 15, 20)

#Color
if (require(RColorBrewer)){
    palette=brewer.pal(n=length(ndays), name='Set1')

    TDColor<-TargetDiagram(prodEx, end=day, ndays=ndays,
                           color=palette)
}

#B&W
TDbw<-TargetDiagram(prodEx, end=day, ndays=ndays)

Run the code above in your browser using DataLab