|
17 | 17 | from pvlib.tools import cosd, sind, acosd |
18 | 18 |
|
19 | 19 |
|
20 | | -def _get_builtin_models(): |
21 | | - """ |
22 | | - Get builtin IAM models' usage information. |
23 | | -
|
24 | | - Returns |
25 | | - ------- |
26 | | - info : dict |
27 | | - A dictionary of dictionaries keyed by builtin IAM model name, with |
28 | | - each model dictionary containing: |
29 | | -
|
30 | | - * 'func': callable |
31 | | - The callable model function |
32 | | - * 'params_required': set of str |
33 | | - The model function's required parameters |
34 | | - * 'params_optional': set of str |
35 | | - The model function's optional parameters |
36 | | -
|
37 | | - See Also |
38 | | - -------- |
39 | | - pvlib.iam.ashrae |
40 | | - pvlib.iam.interp |
41 | | - pvlib.iam.martin_ruiz |
42 | | - pvlib.iam.physical |
43 | | - pvlib.iam.sapm |
44 | | - pvlib.iam.schlick |
45 | | - """ |
46 | | - return { |
47 | | - 'ashrae': { |
48 | | - 'func': ashrae, |
49 | | - 'params_required': set(), |
50 | | - 'params_optional': {'b'}, |
51 | | - }, |
52 | | - 'interp': { |
53 | | - 'func': interp, |
54 | | - 'params_required': {'theta_ref', 'iam_ref'}, |
55 | | - 'params_optional': {'method', 'normalize'}, |
56 | | - }, |
57 | | - 'martin_ruiz': { |
58 | | - 'func': martin_ruiz, |
59 | | - 'params_required': set(), |
60 | | - 'params_optional': {'a_r'}, |
61 | | - }, |
62 | | - 'physical': { |
63 | | - 'func': physical, |
64 | | - 'params_required': set(), |
65 | | - 'params_optional': {'n', 'K', 'L', 'n_ar'}, |
66 | | - }, |
67 | | - 'sapm': { |
68 | | - 'func': sapm, |
69 | | - 'params_required': {'B0', 'B1', 'B2', 'B3', 'B4', 'B5'}, |
70 | | - 'params_optional': {'upper'}, |
71 | | - }, |
72 | | - 'schlick': { |
73 | | - 'func': schlick, |
74 | | - 'params_required': set(), |
75 | | - 'params_optional': set(), |
76 | | - }, |
77 | | - } |
78 | | - |
79 | | - |
80 | 20 | def ashrae(aoi, b=0.05): |
81 | 21 | r""" |
82 | 22 | Determine the incidence angle modifier using the ASHRAE transmission |
@@ -370,7 +310,7 @@ def martin_ruiz(aoi, a_r=0.16): |
370 | 310 |
|
371 | 311 | def martin_ruiz_diffuse(surface_tilt, a_r=0.16, c1=0.4244, c2=None): |
372 | 312 | ''' |
373 | | - Determine the incidence angle modifiers (iam) for diffuse sky and |
| 313 | + Determine the incidence angle modifiers (IAM) for diffuse sky and |
374 | 314 | ground-reflected irradiance using the Martin and Ruiz incident angle model. |
375 | 315 |
|
376 | 316 | Parameters |
@@ -557,54 +497,88 @@ def interp(aoi, theta_ref, iam_ref, method='linear', normalize=True): |
557 | 497 |
|
558 | 498 | def sapm(aoi, B0, B1, B2, B3, B4, B5, upper=None): |
559 | 499 | r""" |
560 | | - Determine the incidence angle modifier (IAM) using the SAPM model. |
| 500 | + Caclulate the incidence angle modifier (IAM), :math:`f_2`, using the |
| 501 | + Sandia Array Performance Model (SAPM). |
| 502 | +
|
| 503 | + The SAPM incidence angle modifier is part of the broader Sandia Array |
| 504 | + Performance Model, which defines five points on an IV curve using empirical |
| 505 | + module-specific coefficients. Module coefficients for the SAPM are |
| 506 | + available in the SAPM database and can be retrieved for use through |
| 507 | + :py:func:`pvlib.pvsystem.retrieve_sam()`. More details on the SAPM can be |
| 508 | + found in [1]_, while a full description of the procedure to determine the |
| 509 | + empirical model coefficients, including those for the SAPM incidence angle |
| 510 | + modifier, can be found in [2]_. |
561 | 511 |
|
562 | 512 | Parameters |
563 | 513 | ---------- |
564 | 514 | aoi : numeric |
565 | 515 | Angle of incidence in degrees. Negative input angles will return |
566 | 516 | zeros. |
567 | 517 |
|
568 | | - B0 : The coefficient of the degree-0 polynomial term. |
| 518 | + B0 : float |
| 519 | + The coefficient of the degree-0 polynomial term. |
569 | 520 |
|
570 | | - B1 : The coefficient of the degree-1 polynomial term. |
| 521 | + B1 : float |
| 522 | + The coefficient of the degree-1 polynomial term. |
571 | 523 |
|
572 | | - B2 : The coefficient of the degree-2 polynomial term. |
| 524 | + B2 : float |
| 525 | + The coefficient of the degree-2 polynomial term. |
573 | 526 |
|
574 | | - B3 : The coefficient of the degree-3 polynomial term. |
| 527 | + B3 : float |
| 528 | + The coefficient of the degree-3 polynomial term. |
575 | 529 |
|
576 | | - B4 : The coefficient of the degree-4 polynomial term. |
| 530 | + B4 : float |
| 531 | + The coefficient of the degree-4 polynomial term. |
577 | 532 |
|
578 | | - B5 : The coefficient of the degree-5 polynomial term. |
| 533 | + B5 : float |
| 534 | + The coefficient of the degree-5 polynomial term. |
579 | 535 |
|
580 | 536 | upper : float, optional |
581 | 537 | Upper limit on the results. None means no upper limiting. |
582 | 538 |
|
583 | 539 | Returns |
584 | 540 | ------- |
585 | 541 | iam : numeric |
586 | | - The SAPM angle of incidence loss coefficient, termed F2 in [1]_. |
| 542 | + The SAPM angle of incidence loss coefficient, :math:`f_2` in [1]_. |
587 | 543 |
|
588 | 544 | Notes |
589 | 545 | ----- |
| 546 | + The SAPM spectral correction functions parameterises :math:`f_2` as a |
| 547 | + fifth-order polynomial function of angle of incidence: |
| 548 | +
|
| 549 | + .. math:: |
| 550 | +
|
| 551 | + f_2 = b_0 + b_1 AOI + b_2 AOI^2 + b_3 AOI^3 + b_4 AOI^4 + b_5 AOI^5. |
| 552 | +
|
| 553 | + where :math:`f_2` is the spectral mismatch factor, :math:`b_{0-5}` are |
| 554 | + the module-specific coefficients, and :math:`AOI` is the angle of |
| 555 | + incidence. More detail on how this incidence angle modifier function was |
| 556 | + developed can be found in [3]_. Its measurement is described in [4]_. |
| 557 | +
|
590 | 558 | The SAPM [1]_ traditionally does not define an upper limit on the AOI |
591 | 559 | loss function and values slightly exceeding 1 may exist for moderate |
592 | 560 | angles of incidence (15-40 degrees). However, users may consider |
593 | 561 | imposing an upper limit of 1. |
594 | 562 |
|
595 | 563 | References |
596 | 564 | ---------- |
597 | | - .. [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance |
598 | | - Model", SAND Report 3535, Sandia National Laboratories, Albuquerque, |
599 | | - NM. |
600 | | -
|
601 | | - .. [2] B.H. King et al, "Procedure to Determine Coefficients for the |
602 | | - Sandia Array Performance Model (SAPM)," SAND2016-5284, Sandia |
603 | | - National Laboratories (2016). |
604 | | -
|
605 | | - .. [3] B.H. King et al, "Recent Advancements in Outdoor Measurement |
606 | | - Techniques for Angle of Incidence Effects," 42nd IEEE PVSC (2015). |
607 | | - :doi:`10.1109/PVSC.2015.7355849` |
| 565 | + .. [1] King, D., Kratochvil, J., and Boyson W. (2004), "Sandia |
| 566 | + Photovoltaic Array Performance Model", (No. SAND2004-3535), Sandia |
| 567 | + National Laboratories, Albuquerque, NM (United States). |
| 568 | + :doi:`10.2172/919131` |
| 569 | + .. [2] King, B., Hansen, C., Riley, D., Robinson, C., and Pratt, L. |
| 570 | + (2016). Procedure to determine coefficients for the Sandia Array |
| 571 | + Performance Model (SAPM) (No. SAND2016-5284). Sandia National |
| 572 | + Laboratories, Albuquerque, NM (United States). |
| 573 | + :doi:`10.2172/1256510` |
| 574 | + .. [3] King, D., Kratochvil, J., and Boyson, W. "Measuring solar spectral |
| 575 | + and angle-of-incidence effects on photovoltaic modules and solar |
| 576 | + irradiance sensors." Conference Record of the 26th IEEE Potovoltaic |
| 577 | + Specialists Conference (PVSC). IEEE, 1997. |
| 578 | + :doi:`10.1109/PVSC.1997.654283` |
| 579 | + .. [4] B.H. King et al, "Recent Advancements in Outdoor Measurement |
| 580 | + Techniques for Angle of Incidence Effects," 42nd IEEE PVSC (2015). |
| 581 | + :doi:`10.1109/PVSC.2015.7355849` |
608 | 582 |
|
609 | 583 | See Also |
610 | 584 | -------- |
@@ -1022,6 +996,66 @@ def schlick_diffuse(surface_tilt): |
1022 | 996 | return cuk, cug |
1023 | 997 |
|
1024 | 998 |
|
| 999 | +def _get_builtin_models(): |
| 1000 | + """ |
| 1001 | + Get builtin IAM models' usage information. |
| 1002 | +
|
| 1003 | + Returns |
| 1004 | + ------- |
| 1005 | + info : dict |
| 1006 | + A dictionary of dictionaries keyed by builtin IAM model name, with |
| 1007 | + each model dictionary containing: |
| 1008 | +
|
| 1009 | + * 'func': callable |
| 1010 | + The callable model function |
| 1011 | + * 'params_required': set of str |
| 1012 | + The model function's required parameters |
| 1013 | + * 'params_optional': set of str |
| 1014 | + The model function's optional parameters |
| 1015 | +
|
| 1016 | + See Also |
| 1017 | + -------- |
| 1018 | + pvlib.iam.ashrae |
| 1019 | + pvlib.iam.interp |
| 1020 | + pvlib.iam.martin_ruiz |
| 1021 | + pvlib.iam.physical |
| 1022 | + pvlib.iam.sapm |
| 1023 | + pvlib.iam.schlick |
| 1024 | + """ |
| 1025 | + return { |
| 1026 | + 'ashrae': { |
| 1027 | + 'func': ashrae, |
| 1028 | + 'params_required': set(), |
| 1029 | + 'params_optional': {'b'}, |
| 1030 | + }, |
| 1031 | + 'interp': { |
| 1032 | + 'func': interp, |
| 1033 | + 'params_required': {'theta_ref', 'iam_ref'}, |
| 1034 | + 'params_optional': {'method', 'normalize'}, |
| 1035 | + }, |
| 1036 | + 'martin_ruiz': { |
| 1037 | + 'func': martin_ruiz, |
| 1038 | + 'params_required': set(), |
| 1039 | + 'params_optional': {'a_r'}, |
| 1040 | + }, |
| 1041 | + 'physical': { |
| 1042 | + 'func': physical, |
| 1043 | + 'params_required': set(), |
| 1044 | + 'params_optional': {'n', 'K', 'L', 'n_ar'}, |
| 1045 | + }, |
| 1046 | + 'sapm': { |
| 1047 | + 'func': sapm, |
| 1048 | + 'params_required': {'B0', 'B1', 'B2', 'B3', 'B4', 'B5'}, |
| 1049 | + 'params_optional': {'upper'}, |
| 1050 | + }, |
| 1051 | + 'schlick': { |
| 1052 | + 'func': schlick, |
| 1053 | + 'params_required': set(), |
| 1054 | + 'params_optional': set(), |
| 1055 | + }, |
| 1056 | + } |
| 1057 | + |
| 1058 | + |
1025 | 1059 | def _get_fittable_or_convertable_model(builtin_model_name): |
1026 | 1060 | # check that model is implemented and fittable or convertable |
1027 | 1061 | implemented_builtin_models = { |
|
0 commit comments