Sunday, October 7, 2012

Keeping an eye on my Photovoltaic System

Guest Post by Benjamin Steinwender

At my home place we have recently installed two photovoltaic systems with a total peak power production of 15 kW. From the first moment my dad confronted me with this idea, I wanted to record time series data of any measurement signal I could obtain from the system. Most promising was the fact of an included web server on the power converter.


Storing time series data over long periods can lead to high disk usage. Fortunately, I came across RRDtool (round-robin-database tool) - when I installed a monitoring solution for a FEM simulation server cluster and its UPS some time ago.

RRDtool stores data in a circular buffer so that its file size remains constant over time. However, older data will be overwritten after some time. The idea is to store the data in so-called round-robin archives with a consolidation function applied in order to keep the interesting properties. In my special application, the following archive sizes are used:
  •     10080 x 1 minute samples for 7 days
  •     11760 x 5 minute maximum & average values for 40 days, 20 hours
  •     4704 x 30 minute maximum & average values for 98 days
  •     2604 x 2 hour maximum & average values for ~ 7.2 months
  •     2678 x 1 day maximum & average values for ~ 7.3 years
This gives plenty of storage with a reasonable file size of roughly 420 kB per data series.


To ease the data presentation and acquisition, cacti is used. This web-based application (favorable a Linux web server + PHP and MySQL required) is based on the RRDtool and provides Data Input Methods and Graph Templates as well as a nice graphical user interface to view the recorded data. Cacti primarily supports data acquisition via SNMP queries, but the power converter does not provide such interface. However, custom scripts can also be used.


Therefore, a PHP script has been written to fetch the current web page of the power converter and a simple HTML DOM (document-object-model) parser was used to extract the required field values. The tools run on a 24/7 NAS server where a cron job invokes the cacti poller (and thus the script) once every minute.


Data acquisition is now successfully running since about 1 month. The total power production from last week can be seen in the following figure. The light-blue area represents the power output of the smaller (5 kW) system and the stacked dark-blue area is the power output of the larger (9.8 kW) system. From the data series we can even infer on the weather – the figure indicates that is was sunny at the weekend, cloudy on Monday, Tuesday and Friday and rainy on Wednesday and Thursday.

1 comment:

  1. his is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the excellent work. Impianti fotovoltaici