Measuring GHI with rtrace in scenes with diffuse irradiance

Hi all,

I have a question regarding the results of rtrace when measuring irradiance. When looking at the results of rtrace, we noticed that we were “missing” some irradiance, in the sense that we were not getting the expected GHI values when measuring at the ground.

It is easy to reproduce the issue. I created a sky using gendaylit, with the G option. The irradiance values are GHI = 1000 W/m2 and DHI = 200 W/m2. I added a flat plane representing the ground to the scene, and then I measured the irradiance values at the center of the plane, with the ray being perfectly perpendicular to the surface.

This is the gendaylit command:
gendaylit -ang 80.0 0.0 -G 800.0 200.0 -g 0.0 -O 1

This is the ground OBJ file:

usemtl terrain_mat
v 0.0000 0.0000 0.0000
v 100.0000 0.0000 0.0000
v 100.0000 100.0000 0.0000
v 0.0000 100.0000 0.0000
f 1 2 3
f 1 3 4

Which we then convert to a rad file using obj2rad -o ground OBJ_FILE. We then use the oconv command to generate the octree.

And this is the rtrace command:
rtrace -i -faa -ab 1 -aa 0.2 -ar 20 -ad 128 -as 64 -h -ov OCT_FILE
50 50 0.01 0 0 -1

We reduced the precision of the rtrace calculation to optimize performance. Our first suspicion was that this decision was the issue, but increasing the precision by tweaking the parameters does not change the result.

Doing this, I expected to get the GHI value of 1000 W/m2. However, I never get that exact value, instead I always get a value which is lower, in the range of 990-998 W/m2. The concern is not regarding the variability; it is regarding the bias. The measured value is always lower than the expected value.

I also wanted to mention that the issue is only apparent when the DHI value is higher than say 30 W/m2. I feel like this should give us some clue regarding the root cause of the difference in results but that is as far as I got.

The context of our efforts is the development of an energy yield calculation for Photovoltaic plants. We started looking into this issue because we noticed that the frontal irradiance values were consistently lower than the results we get from our previous model.

Please let me know if any other information is needed.

Thanks in advance for your answers,

Félix

I’m not sure you can expect perfect accuracy from the normalization procedure in gendaylit. Did you try substituting gensky to see if the agreement was any better? Numerical approximations to the hemispherical integration over the sky are rarely exact. You may have to do your own normalization using rtrace if you need better than 1% accuracy.

Best,
-Greg

Hi Greg,

Many thanks for your quick reply!!

I understand that we cannot expect perfect accuracy. Following your suggestion, we tested the gensky command using these values

gensky -ang 80 0 -R 800 -B 200

But the results are more or less the same, the value is always lower, around 995 W/m2. When we test with 0 BHI and 1000 DHI the error is up to 1% (results of 980 to 1000 W/m2).

I agree that maybe we will have to do our own normalization. Just to make sure I understand your suggestion, I was thinking about using this procedure (flat terrain, sky generated with gendaylit, measurement using rtrace) to calculate the results of rtrace, and calculating a normalization factor which we would then apply in our subsequent calculations.

For example, using the procedure above we get a GHI of 992 measured using rtrace. Therefore, the normalization factor is 1000/992 = 1.008. We then multiply any irradiance result we get from rtrace by that value.

Is that what you were proposing?

Best regards,

Félix

Hi Felix,

I looked into this more closely. In the case of gensky at least, there is a slight inaccuracy in how the solar brightness is computed based on a -R setting. I was using a factor of “6e-6” when it should really be “5.98e-6” for the conversion on line 272 in gensky.c. This is a third of a percentage point of difference. With this correction, I get nearly exact results. The sky normalization is already fairly good.

So, while you did understand my previous suggestion correctly, it may work just as well to test the solar and sky contributions separately and come up with an adjustment for exact results, at least in the case of gensky. I am less familiar with gendaylit.

Cheers,
-Greg

Thanks Greg!! We will investigate the problem as you suggested, by separating the components and studying the results. I will post our results here next week hopefully.