0

Hi there and thanks for reading this question,

I'm having problems interpolating quarter hour values for irradiation data. The given hourly data looks like this:

 h   W/m²
[09]   0
[10]   4
[11]  15
[12]  56
[13]  77
[14]  37
[15]   0

This is not the current irradiation at the given time but the mean irradiation during the previous hour. That means the mean irradiation between 9am and 10am was 4 W/m² or 4 Wh in total, and so on. So basically, you have a given integral over a time interval but need to interpolate actual values for certain times.

I tried piecewise cubic interpolation (modified Akima looked best) using the mean value of the interval as the current irradiation in the middle of the interval, so exactly 4 W/m² at 9.30am, and that basically looks okay. The problem is that I am trying to match the results of TRNSYS, a building simulation software, and with the same input data, TRNSYS calculates the following momentarily values:

  h      TRNSYS   MY APPROACH
[8.50]   0.00     0.00
[8.75]   0.00     0.41
[9.00]   0.00     1.42
[9.25]   1.66     2.72
[9.50]   3.88     4.00
[9.75]   6.10     5.55
[10.00]  8.61     7.88
[10.25]  11.53    11.02
[10.50]  14.99    15.00
[10.75]  21.47    22.38
[11.00]  32.62    33.69
[11.25]  45.32    45.90
[11.50]  56.46    56.00
[11.75]  64.97    64.39
[12.00]  72.12    72.10
[12.25]  77.06    77.00
[12.50]  78.89    77.00
[12.75]  75.85    70.77
[13.00]  67.21    60.21
[13.25]  54.56    48.05
[13.50]  39.48    37.00
[13.75]  20.97    25.83
[14.00]  1.51     13.71
[14.25]  0.00     3.98
[14.50]  0.00     0.00

Or as graphs: Comparison of TRNSYS and makima

You can see that the values at 9.30am, 10.30am, ... are nearly the given mean values, but it's no exact match, as it is in my approach. Especially at the edges the results differ a lot. So, how does TRNSYS calculate these points?

In case anyone is wondering, there is no documentation.

Any help would be greatly appreciated!

1 Answers1

0

First of all, Welcome to the site !

When you make interpolation, the results depend very much on the method. Using your data, what I obtained is $$\left( \begin{array}{ccc} \text{time} & \text{splines} & \text{Hermite} \\ 9.00 & 0.000 & 0.000 \\ 9.25 & 2.604 & 1.602 \\ 9.50 & 3.708 & 2.563 \\ 9.75 & 3.958 & 3.242 \\ 10.00 & 4.000 & 4.000 \\ 10.25 & 4.480 & 5.200 \\ 10.50 & 6.042 & 7.188 \\ 10.75 & 9.334 & 10.34 \\ 11.00 & 15.00 & 15.00 \\ 11.25 & 23.40 & 24.39 \\ 11.50 & 33.75 & 34.88 \\ 11.75 & 44.97 & 45.67 \\ 12.00 & 56.00 & 56.00 \\ 12.25 & 65.76 & 64.73 \\ 12.50 & 73.22 & 71.56 \\ 12.75 & 77.31 & 75.87 \\ 13.00 & 77.00 & 77.00 \\ 13.25 & 71.65 & 70.22 \\ 13.50 & 62.26 & 60.63 \\ 13.75 & 50.24 & 49.22 \\ 14.00 & 37.00 & 37.00 \\ 14.25 & 23.95 & 24.97\\ 14.50 & 12.49 & 14.13 \\ 14.75 & 4.037 & 5.469 \\ 15.00 & 0.000 & 0.000 \end{array} \right)$$

  • Thanks for the answer! Sorry I answer a little late.. It's clear to me that it depends on the interpolation method. But what I need is to keep the summed irradiation of the original data. So for example, the mean of the values between 13.00 and 13.75 should be 37, or at least close to that value. And after (and including 14.00) the irradiation has to be zero. That's why I meant it is so difficult to replicate the values of trnsys – John_Doe Feb 29 '20 at 17:46