Hybrid Car – More Fun with Less Gas

Ported pvwatts results - Page 2

register ::  Login Password  :: Lost Password?
Posted by Curbie on May 26, 2009, 9:45 pm
 
Martin,

Finally after two more days of debugging, I’m pretty clear on my
questions.

This is the best results I can expect and the differences remaining
are due to compiler float point implementations.

I’m a little troubled that the differences in available radiation
(Rad. kWh) between my port and the NREL standard seem to grow the more
available radiation there is, but I’m pretty certain now that this is
due to compiler float point implementations and there is nothing I can
do about it.

After all this test was on Anchorage Alaska I’ll may end up revisiting
the debugging depending on the differences  for sunny places like
Miami, but for now I’m going to optimize the port for VBA and test
changes against this. As soon as I’m through optimizing and cleaning,
I’ll test other locations.

I’m more comfortable that my available radiation results are slightly
less than instead of slightly more than NREL’s, I’d rather be on safe
side.

Thanks again for your time and help, sometimes a little encouragement
goes a long way.

Have fun.
 
Curbie

(Me)***********************************************************
Station Identification
WBRS#:                  26451
City:                   Anchorage
State:                  Alaska
Latitude(deg):          61.16667
Longitude(deg):         -150.0167
Elevation(m):           35

PV System Specifications
AC Rating(kW):          4
Array Type:             Fixed Tilt
Array Tilt(deg):        61.16667
Array Azimuth(deg):     180
Energy Cost(cents/kWh): 0.124

Energy Production      

Month  Rad.    AC       kWh
       (kwh)  (kwh)     cost
    1   0.83    095    11.78
    2   2.16    245    30.38
    3   3.74    469    58.16
    4   4.31    506    62.74
    5   4.82    569    70.56
    6   4.68    511    63.36
    7   4.45    496    61.50
    8   3.74    417    51.71
    9   3.25    362    44.89
   10   1.87    217    26.91
   11   1.39    163    20.21
   12   0.61    066    08.18
----------------------------
Yearly  2.99   4110   509.64

 1     0    0    0    0    0    0    0    0    0    0    0    0
 2     0    0    0    0    0    0    0    0    0    0    0    0
 3     0    0    0    0    0    0    0    0    0    0    0    0
 4     0    0    0    0    0    0    0    0    0    0    0    0
 5     0    0    0    0    0    0    0    0    0    0    0    0
 6     0    0    0    0    0    0    0    0    0    0    0    0
 7     0    0    0    0    0    0    0    0    0    0    0    0
 8     0    0    0    0    0    1    0    0    0    0    0    0
 9     0    0    7    2    7    8    4    1    0    0    0    0
10     0    4   23   15   21   22   16   12    9    3    4    0
11     6   21   40   31   35   34   28   22   21   14   19    2
12    11   33   46   47   48   45   40   35   34   21   26   11
13    19   41   60   56   60   49   49   46   41   27   31   15
14    19   42   57   61   61   56   52   46   45   31   25   15
15    15   37   59   59   64   51   53   46   47   29   21    9
16     6   27   48   54   55   50   50   45   40   26    9    1
17     1   11   28   47   47   47   42   37   33   17    0    0
18     0    1   10   33   35   33   34   29   20    6    0    0
19     0    0    0   15   19   20   22   14    9    0    0    0
20     0    0    0    2    5    8    8    3    0    0    0    0
21     0    0    0    0    0    1    1    0    0    0    0    0
22     0    0    0    0    0    0    0    0    0    0    0    0
23     0    0    0    0    0    0    0    0    0    0    0    0
24     0    0    0    0    0    0    0    0    0    0    0    0

(NREL)*********************************************************
Station Identification
WBAN#:           26451
City:            ANCHORAGE
State:           AK
Latitude(deg):   N 61.17
Longitude(deg):  W150.02
Elevation(m):      35

PV System Specifications
AC Rating(kW):      4.0
Array Type:      Fixed Tilt
Array Tilt(deg):     61.2
Array Azimuth(deg): 180.0

Energy Cost(cents/kWh): 12.4

Energy Production
   1  0.83       95      11.78
   2  2.16      244      30.26
   3  3.77      469      58.16
   4  4.35      506      62.74
   5  4.88      568      70.43
   6  4.74      510      63.24
   7  4.50      495      61.38
   8  3.77      417      51.71
   9  3.28      361      44.76
  10  1.88      216      26.78
  11  1.39      163      20.21
  12  0.61       66       8.18
Year  3.02     4110     509.64


 1     0    0    0    0    0    0    0    0    0    0    0    0
 2     0    0    0    0    0    0    0    0    0    0    0    0
 3     0    0    0    0    0    0    0    0    0    0    0    0
 4     0    0    0    0    0    0    0    0    0    0    0    0
 5     0    0    0    0    0    0    0    0    0    0    0    0
 6     0    0    0    0    0    0    0    0    0    0    0    0
 7     0    0    0    0    0    0    0    0    0    0    0    0
 8     0    0    0    0    0    1    0    0    0    0    0    0
 9     0    0    7    2    7    8    4    1    0    0    0    0
10     0    4   23   15   22   22   16   12    9    3    4    0
11     6   21   40   31   35   34   28   22   21   14   19    2
12    11   33   46   47   48   45   40   35   34   21   26   11
13    19   41   60   56   60   49   49   46   41   27   31   15
14    19   42   57   61   62   56   52   46   45   31   25   15
15    15   37   59   59   64   51   53   46   47   29   21    9
16     6   27   48   54   55   50   50   45   40   26    9    1
17     1   11   27   47   47   47   42   37   33   17    0    0
18     0    1   10   33   35   33   34   29   20    6    0    0
19     0    0    0   15   19   20   22   14    9    0    0    0
20     0    0    0    2    5    8    8    3    0    0    0    0
21     0    0    0    0    0    1    1    0    0    0    0    0
22     0    0    0    0    0    0    0    0    0    0    0    0
23     0    0    0    0    0    0    0    0    0    0    0    0
24     0    0    0    0    0    0    0    0    0    0    0    0



Posted by BobG on May 27, 2009, 12:19 am
 
Things to look for: Go thru the source and look for any parenthesized
expression that doesnt have a decimal point in it.... this expression
would get evaluated as an int, even if the result was promoted to
double later. You get fp errors in single precision when you try to
add a little number to a big number... thats why they invented double
precision. I'd also look for any transcendentals (sines, cosines,
arctans) that use a lazy approximate version of pi like 3.141 instead
of something like M_PI with full machine precision. If you multiply a
bunch of 80 bit numbers together with a crummy 12 bit approximation of
pi, you get a crummy 12 bit result.

Posted by BobG on May 27, 2009, 12:49 am
 So I looked for the pvwatts.c v1 program on nrel site and couldnt find
it. I see where you posted the solpos program in the other group. How
about send me the pvwatt.c file?

Posted by Curbie on May 27, 2009, 1:58 am
 Bob,

Better yet...

Pvwatts version 1 directory index is here"
http://rredc.nrel.gov/solar/codes_algs/PVWATTS/version1/US/code/versions/
pvwatts.c

Be sure to grab these guys too, you'll need them:
electric.dat
pvsystem.dat
pvweb.dat
station.num


Typical Meteorological Year (TMY2) data, download from the National
Renewable Energy Laboratory (NREL) web-site here:
http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/

If you want to play with TMY3, not directly compatible with pvwatts,
but 1020 stations instead of 239 makes it worth the effort (IMO).
Typical Meteorological Year (TMY3) data, download from the National
Renewable Energy Laboratory (NREL) web-site here:
http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/tmy3/

There is also a pvwatts 2 out there somewhere.

Have fun.

Curbie


Posted by Curbie on May 27, 2009, 1:31 am
 Bob,

Bio-fuel in the morning, PV in the evening, you get around.


 I ran into that twice during single-step debugging, but couldn't
categorize the issue well enough to make changes by just reading the
code. After two days (my 3rd. go round) of debugging, I'm pretty sure
the remaining small differences are just compiler FP implementation
differences iterated of bunch of times.

I ran C and VBA debuggers side-by-side and single-stepped through
thousands of steps, I'm not saying it's perfect as is sits, but for
now it's time to clean-up and optimize against the results I have.
After that, I'll run tests on different latitude/longitude extremes
(four counters and center of the country along with Hawaii),
daylight-saving-time areas, looking for some larger differences which
should be easier follow and debug.

Did you know that you can use either sodium hydroxide or potassium
hydroxide for the transesterification, potassium hydroxide can be
home-made from wood ash?

Have fun.

Curbie


This Thread
Bookmark this thread:
 
 
 
 
 
 
  •  
  • Subject
  • Author
  • Date
please rate this thread