Skip to content

PV Expected Generation Datum Filter

The PV Expected Generation Datum Filter provides a way to inject the expected power of a PV array, based on a set of PV characteristics and a global horizontal irradiance (GHI) or plane-of-array (POA) irradiance property value, such as from a pyranometer or reference cell deployed with the PV system. Comparing the expected power with the power the array actually generates shows when the array is underperforming, for example from a fault, soiling, or shading, and a Virtual Meter can turn the expected power into expected energy.

The filter uses the pvlib library to model the array, and calculates the irradiance on the array the same way as the POA Irradiance Calculator. Each filter models one array, so a site with several arrays configures one filter per array, as described in Multiple arrays.

Info

This filter is provided by the pvlib Datum Filters plugin, which is provided by the solarnode-app-datumfilters-pvlib package in SolarNodeOS. It is a User Datum Filter, listed as PV Expected Power Calculator (pvlib).

How it works

Configure the filter's Source ID to match the datum stream with the irradiance readings, such as from a weather station. For each datum with an irradiance reading, the filter passes the PV characteristics and the datum's readings to the pvlib server on the node, which calculates the expected power at the datum's date in these steps:

  1. Sun position: the position of the sun at the array's location.
  2. Irradiance on the array: a GHI reading is split into its direct and diffuse parts with the Erbs model, then transposed onto the array plane with the Transposition Model. A POA reading from a sensor in the array plane is used as it is. With Tracking the array plane follows a single-axis tracker, and with Bifacial the irradiance on the rear of the array is added, from a rear POA reading or pvlib's infinite sheds model. See Irradiance readings for the details.
  3. Effective irradiance: the irradiance the cells receive. For transposed irradiance this excludes the direct light the module glass reflects at the sun's angle of incidence, from pvlib's physical incidence angle modifier. A POA reading is used as the effective irradiance, as a reference cell sees much the same reflection as the modules.
  4. Cell temperature: from the SAPM cell temperature model, with the parameters for the Racking. The model uses a module temperature reading if the datum has one, otherwise the air temperature and wind speed readings, or 20 °C and 1 m/s without them.
  5. DC power: from the PVWatts DC model. The DC Rating, derated for the array's age if it has an Install Date, is scaled by the effective irradiance relative to 1000 W/m2 and corrected for the cell temperature with the Temperature Coefficient, and for low light with any Low-Light Loss Percent, less the Loss Percent and any Wiring Loss Percent.
  6. AC power: from the PVWatts inverter model, with the Inverter Efficiency, and clipped at the AC Rating.

The filter then sets the Power Property, watts_expected by default, to the expected AC power, and evaluates any Expressions, which can use the values calculated along the way. The PVWatts models need only values from module and inverter datasheets, rather than detailed module and inverter parameters.

Expected means if everything is running

The expected power is what the array should generate at the inverter's output if everything is running, so the model does not include:

  • shading from the horizon or nearby objects, other than the flat allowance in Loss Percent
  • snow, soiling that changes over time, or the spectrum of the light
  • export limits, curtailment, or inverter and string outages
  • AC losses after the inverter, such as in cables and transformers
  • anything that takes time, such as the modules warming up: each datum is calculated on its own

Without a Low-Light Loss Percent, the model also takes the modules to be as efficient in low light as at 1000 W/m2, so the expected power reads a few percent high early and late in the day and under heavy cloud.

Actual power below the expected power is a reason to look for a cause, rather than proof of a fault.

Irradiance readings

The filter applies only to datum with a number for the GHI Property, the POA Property, or both. It leaves any other datum unchanged, even one with a Rear POA Property reading. A reading below 0, such as a pyranometer's offset at night, is taken as 0.

A POA sensor is in the array plane unless its POA Sensor Tilt or POA Sensor Azimuth is set to an orientation other than the array's. With Tracking, a sensor with no orientation set is taken to be on the tracker, in the array plane, and a sensor with an orientation set is fixed, so not in the array plane. The irradiance on the array then comes from:

Readings Irradiance on the array irradiance_source
GHI only Transposed from the GHI reading. ghi
POA in the array plane, with or without GHI The POA reading. poa
POA at another orientation, without GHI Transposed from the GHI that gives the POA reading at the sensor's orientation. ghi_from_poa
GHI, and POA at another orientation Transposed from the GHI reading. The POA reading is not used. ghi

The irradiance_source result shows which applied to a datum.

On a bifacial array, the irradiance on the rear is the Rear POA Property reading if the datum has one. Otherwise it is modelled with infinite sheds, from the GHI reading, or without one from the GHI that gives the POA reading. Either way it is weighted by the Bifaciality, Shade Factor, and Transmission Factor, then added to the irradiance on the front. The irradiance_source_back result shows which applied: poa for the reading, or ghi or ghi_from_poa for the GHI the rear was modelled from.

Rear irradiance sensors

Rear irradiance varies across the back of a row: from the top of the modules to the bottom, near the mounting structure, and towards the ends of the rows. A single sensor measures one point, so several rear sensors averaged into one property, such as with an Expression filter before this filter in a Filter Chain, represent the array better. Even a single sensor captures changes that a fixed Albedo cannot, such as snow or wet ground. Set the Shade Factor to 0 if the sensors already see the shade of the mounting structure.

An irradiance reading above 2000 W/m2, an air temperature reading outside -60 to 70 °C, a module temperature reading outside -60 to 120 °C, or a wind speed reading outside 0 to 100 m/s is an error: the filter logs it and leaves the datum unchanged.

Settings

PV Expected Generation filter component settings

In addition to the Common Settings, the following general settings are available:

Setting Description
Metadata Service The Service Name of the Metadata Service to obtain the PV characteristics from. See Metadata Parameters for more information.
Metadata Path The metadata path that will resolve the PV characteristics from the configured Metadata Service or the datum metadata of the datum stream being filtered, for example /pm/pv-site. See Metadata Parameters for more information.
Alternate Metadata Path An alternate metadata path that will resolve the PV characteristics from the configured Metadata Service or the datum metadata of the datum stream being filtered, for example /pm/pv-arrays/east. Its characteristics override those at the Metadata Path. See Metadata Parameters for more information.
Use Node Location If enabled, then the location configured for this node in SolarNetwork will be used in preference to the Latitude, Longitude, and Altitude settings configured on this filter.
GHI Property The name of the datum property to obtain the GHI irradiance reading from, in W/m2. Leave empty to use only the POA Property. Defaults to irradiance.
POA Property The name of the datum property to obtain a POA irradiance reading from, in W/m2, such as from a reference cell. Leave empty to use only the GHI Property. See Irradiance readings for how the two are used.
POA Sensor Tilt The tilt of the POA Property sensor in degrees from horizontal, from -90 to 90, if it is not in the array plane. Defaults to the array Tilt.
POA Sensor Azimuth The angle of the POA Property sensor in degrees clockwise from true north, if it is not in the array plane. Defaults to the array Azimuth.
Rear POA Property The name of the datum property to obtain a rear POA irradiance reading from, in W/m2, such as from a reference cell on the back of the array, facing the same way as the rear of the modules. Used only when Bifacial is enabled, in place of the modelled rear irradiance. Leave empty to model the rear irradiance. See Irradiance readings for more information.
Air Temperature Property The name of the datum property to obtain the air temperature reading from, in °C, to calculate the cell temperature. Without a reading 20 is used. Not used when the datum has a Module Temperature Property reading. Defaults to temp.
Wind Speed Property The name of the datum property to obtain the wind speed reading from, in m/s, to calculate the cell temperature. Without a reading 1 is used. Not used when the datum has a Module Temperature Property reading. Defaults to wspeed.
Module Temperature Property The name of the datum property to obtain a module back-surface temperature reading from, in °C. When the datum has this reading, the cell temperature is calculated from it instead of the air temperature and wind speed.
Power Property The name of the datum property to populate with the expected power, in W. Defaults to watts_expected. Leave empty to add only the Expressions properties.
Latitude The decimal latitude of the PV system.
Longitude The decimal longitude of the PV system.
Altitude The altitude of the PV system, in meters above sea level. Defaults to 0.
Time Zone The identifier of the time zone of the PV system, for example Pacific/Auckland. If not specified then the node's time zone will be used.
Azimuth The angle of the PV array in degrees clockwise from true north that the PV system is facing.
Tilt The angle of the PV array in degrees from horizontal, from 0 (facing directly upwards) to 90 (facing the horizon).
Minimum cos(zenith) The minimum value of cos(zenith) to allow when calculating the global clearness index. Defaults to 0.065.
Maximum Zenith The maximum zenith value to allow in DNI calculation. Defaults to 87.
Tracking If enabled, model a single-axis tracker: the Tilt and Azimuth settings are ignored and the array orientation is calculated from the sun position and the tracker axis settings.
Axis Tilt The tilt of the tracker axis in degrees from horizontal, from 0 to 90. Defaults to 0, which it must be when Bifacial is enabled.
Axis Azimuth The angle of the tracker axis in degrees clockwise from true north, for example 0 for a north-south axis. Defaults to 0.
Maximum Angle The maximum tracker rotation angle in degrees from horizontal. Defaults to 90.
Backtrack If enabled, apply backtracking to avoid row-to-row shading, using the Ground Coverage Ratio.
Ground Coverage Ratio The ratio of PV row width to row spacing, used when Backtrack or Bifacial is enabled. Defaults to 0.2857. Set a realistic value in bifacial mode, as the default overstates the rear-side gain.
Bifacial If enabled, model bifacial modules in long rows on flat ground: the POA irradiance then includes the rear-side irradiance, weighted by the Bifaciality and loss factors. Not suitable for rooftop or canopy sites.
Bifaciality The ratio of rear to front module efficiency, from 0 to 1, used when Bifacial is enabled. Defaults to 0.8.
Albedo The fraction of irradiance reflected by the ground, from 0 to 1, for example 0.2 for grass or 0.8 for fresh snow. Defaults to 0.25. Applies with or without Bifacial.
Row Height The height of the PV row center above the ground, in the same units as Row Pitch, greater than 0 up to 100, used when Bifacial is enabled. It must keep the lower edge of the modules above the ground at the Tilt, or at the Maximum Angle with Tracking. Defaults to 1.5.
Row Pitch The distance between adjacent PV rows, in the same units as Row Height, greater than 0 up to 1000, used when Bifacial is enabled. Defaults to 5.
Shade Factor The fractional rear-side irradiance loss from shading by the mounting structure, from -1 to 0, used when Bifacial is enabled. Defaults to -0.02. Set to 0 if a Rear POA Property sensor already sees that shade.
Transmission Factor The fractional rear-side irradiance loss from module features such as the junction box, from -1 to 0, used when Bifacial is enabled. Defaults to 0.
Transposition Model The transposition model to determine diffuse irradiance from the sky on a tilted surface: Hay & Davies (the default) or Perez-Driesse. With Bifacial enabled, Hay & Davies is always used.
DC Rating The DC nameplate rating of the PV array, in W, such as the sum of the ratings of its modules. Required, here or in metadata: without it, the filter logs a warning and leaves the datum unchanged.
Temperature Coefficient (1/°C) The power temperature coefficient of the modules, as a fraction per °C rather than a percentage, from -0.02 to 0: for example -0.0035 for a datasheet value of -0.35%/°C. Defaults to -0.004.
Racking How the modules are mounted, which sets the parameters of the cell temperature model: Open rack, glass-polymer modules (the default), Open rack, glass-glass modules, Close roof mount, glass-glass modules, or Insulated back, glass-polymer modules.
Install Date The date the PV array was installed, like 2021-03-01, to derate the DC Rating for its age by the Degradation Rate. Leave empty for no derating.
Degradation Rate The annual degradation of the DC Rating, as a fraction from 0 to 0.1, used with the Install Date. Defaults to 0.005, or 0.5% a year.
AC Rating The inverter AC rating, in W, where the expected power clips. Defaults to the DC Rating times the Inverter Efficiency. For an array that shares its inverter with others, leave this empty, and clip the sum of their expected power in an expression instead. See Shared inverters for more information.
Inverter Efficiency The nominal inverter efficiency, from 0 (exclusive) to 1. Defaults to 0.96.
Loss Percent The total DC losses, in percent, from 0 to 100, such as for soiling, shading, wiring and mismatch. Defaults to 11.42, the PVWatts default losses without their 3% for availability, as an outage is not a loss while the array is running. That includes 2% for wiring, so with a Wiring Loss Percent use 9.61 for the other default losses.
Low-Light Loss Percent How much lower the module efficiency is at 200 W/m2 than at 1000 W/m2, in percent, from 0 to 20, from the module datasheet: for example 3 for a relative efficiency of 97% at 200 W/m2, or 5 for a 500 W module that makes 95 W at 200 W/m2 and 25 °C. The loss applies below 1000 W/m2, and most in the lowest light. Leave empty for the same efficiency at any irradiance, as in the standard PVWatts model.
Wiring Loss Percent The DC wiring loss at the DC Rating, in percent, from 0 to 20. As resistive losses do, it falls in proportion to the power, so 2 is a 1% loss at half the DC Rating, whereas the Loss Percent is the same at any power. Take the wiring loss out of the Loss Percent when using it. Leave empty to include any wiring loss in the Loss Percent.
Server URL The URL of the pvlib server to calculate with. Defaults to http://127.0.0.1:8099, the server SolarNodeOS runs on the node. Leave empty to run the Command instead.
Command The external command to run when the Server URL is empty, where the parameters and readings will be passed as arguments and the calculation results are returned. Defaults to /var/lib/solarnode/bin/pv-expected-power. See Command for more information.
Timeout The maximum number of seconds to wait for the Server URL to connect and respond, or for the Command to finish, after which the request or command is stopped. Set to 0 to wait forever. Defaults to 60.
Power Result Key The result key to extract for the Power Property: p_ac (the default) for the expected AC power, or p_dc for the expected DC power.
Expressions A list of expression configurations that are evaluated to populate datum property values. All the calculation results are available to them by their result keys. See Expressions below.

Metadata Parameters

This filter can look up the PV characteristics from SolarNetwork metadata, so that many filters can share them. If either Metadata Path or Alternate Metadata Path are configured, then the filter will look for a metadata object with properties as shown below, from any configured Metadata Service and from the datum metadata associated with the source ID of the datum being filtered.

For example, a site with an east and a west array, each on its own inverter, could keep the characteristics the arrays share at /pm/pv-site and those of each array at /pm/pv-arrays/east and /pm/pv-arrays/west:

{
  "pm": {
    "pv-site": {
      "lat":         -36.8509,
      "lon":         174.7645,
      "zone":        "Pacific/Auckland",
      "pvArrayTilt": 15,
      "gammaPdc":    -0.0035,
      "racking":     "close_mount_glass_glass",
      "installDate": "2021-03-01"
    },
    "pv-arrays": {
      "east": {
        "pvArrayAzimuth": 90,
        "pdc0":           6000,
        "acRating":       5000
      },
      "west": {
        "pvArrayAzimuth": 270,
        "pdc0":           4800,
        "acRating":       4000
      }
    }
  }
}

The east array's filter would then have a Metadata Path of /pm/pv-site and an Alternate Metadata Path of /pm/pv-arrays/east, and the west array's filter the same Metadata Path and an Alternate Metadata Path of /pm/pv-arrays/west.

The filter merges all possible PV characteristics from the settings on the filter itself and metadata, in the following order, with later sources overriding earlier sources:

  1. Filter settings
  2. Metadata from the configured Metadata Service, at the Metadata Path and then the Alternate Metadata Path
  3. Datum metadata associated with the source ID of the datum being filtered, at the Metadata Path and then the Alternate Metadata Path
  4. Latitude, longitude, and altitude from the location configured for the node in SolarNetwork, if Use Node Location is enabled

A metadata value outside a numeric range shown below, such as a pdc0 of -1, is logged and ignored, so the value from an earlier source is used instead.

Tip

The POA Irradiance Calculator uses the same metadata keys, and ignores the keys it does not need, such as pdc0, so both filters can share the same metadata.

The supported metadata parameters are:

Metadata Key Description
poaSensorTilt POA Sensor Tilt, in degrees from horizontal, from -90 to 90
poaSensorAzimuth POA Sensor Azimuth, in degrees clockwise from north
lat Latitude, in decimal degrees
lon Longitude, in decimal degrees
alt Altitude, in meters above sea level
zone Time Zone identifier, for example Pacific/Auckland
pvArrayAzimuth Azimuth of the PV array, in degrees clockwise from north
pvArrayTilt Tilt of the PV array, in degrees from horizontal
minCosZenith Minimum cos(zenith)
maxZenith Maximum Zenith
tracking Tracking, true or false
pvAxisTilt Axis Tilt, in degrees from horizontal, from 0 to 90
pvAxisAzimuth Axis Azimuth, in degrees clockwise from north, from 0 to 360
maxAngle Maximum Angle, in degrees from horizontal, greater than 0 up to 180
backtrack Backtrack, true or false
gcr Ground Coverage Ratio, greater than 0 up to 1
bifacial Bifacial, true or false
bifaciality Bifaciality, from 0 to 1
albedo Albedo, from 0 to 1
pvRowHeight Row Height, greater than 0 up to 100
pvRowPitch Row Pitch, greater than 0 up to 1000
shadeFactor Shade Factor, from -1 to 0
transmissionFactor Transmission Factor, from -1 to 0
transpositionModel Transposition Model, haydavies or perez-driesse
pdc0 DC Rating, in W, greater than 0
gammaPdc Temperature Coefficient, from -0.02 to 0
racking Racking, one of open_rack_glass_polymer, open_rack_glass_glass, close_mount_glass_glass, or insulated_back_glass_polymer
installDate Install Date, like 2021-03-01
degradationRate Degradation Rate, from 0 to 0.1
acRating AC Rating, in W, greater than 0
inverterEfficiency Inverter Efficiency, from 0 (exclusive) to 1
lossPercent Loss Percent, from 0 to 100
lossLowLightPercent Low-Light Loss Percent, from 0 to 20
lossWiringPercent Wiring Loss Percent, from 0 to 20

Expressions

Any number of expressions can be configured on the Expressions list. Expressions can reference datum properties as usual, including the Power Property, and additionally any of the calculation results by their result key. A datum property with the same name as a result key takes precedence over the result.

PV Expected Generation filter component expression settings

The available calculation results properties are:

Result Key Description
p_ac The expected AC power, in W.
p_dc The expected DC power, in W.
pac0 The AC power limit of the inverter, in W: the AC Rating, or the DC Rating times the Inverter Efficiency.
clipping true if the expected AC power has reached pac0, otherwise false.
irradiance_source Where the irradiance on the array came from: ghi, poa, or ghi_from_poa. See Irradiance readings.
irradiance_source_back On a bifacial array, where the irradiance on the rear came from: poa for a Rear POA Property reading, otherwise ghi or ghi_from_poa.
ghi, dni, dhi The global horizontal, direct normal, and diffuse horizontal irradiance used, in W/m2. Absent without a GHI reading when a POA reading in the array plane needs none: on a monofacial array, or with a rear POA reading.
poa_global The irradiance on the array, in W/m2. On a bifacial array this includes the weighted rear-side irradiance.
poa_direct, poa_diffuse, poa_sky_diffuse, poa_ground_diffuse The components of the irradiance on the front of the array, in W/m2, when transposed.
poa_front, poa_back, shaded_fraction_front On a bifacial array, the front and rear-side irradiance, in W/m2, and when transposed the shaded fraction of the front. poa_back is the rear POA reading when there is one.
effective_irradiance The irradiance the cells receive, in W/m2.
temp_cell The cell temperature, in °C.
temp_air, wind_speed, temp_module The air temperature in °C and wind speed in m/s used, and the module temperature reading in °C, if there is one.
zenith, azimuth The sun's zenith and azimuth angles, in degrees.
aoi, surface_tilt, surface_azimuth The sun's angle of incidence on the array, and the array's tilt and azimuth, in degrees.
tracker_theta With Tracking, the tracker rotation angle, in degrees.
pdc0 The DC Rating, in W.
age, degradation_factor The array's age in years since the Install Date, and the fraction of the DC Rating remaining at that age.
loss_percent, loss_low_light_percent, loss_wiring_percent The Loss Percent, and the Low-Light Loss Percent and Wiring Loss Percent when set.
date, zone, min_cos_zenith, max_zenith, albedo The date and time zone of the calculation, and the settings of the same name used, albedo only when set.
bifaciality, gcr, height, pitch, shade_factor, transmission_factor, transposition_model On a bifacial array, the bifacial settings used.

For example, the east array in the metadata example, for a datum at 9am on 19 November 2026 with a GHI reading of 600 W/m2, an air temperature of 17 °C, and a wind speed of 2 m/s, has these results:

{
  "date": "2026-11-19T09:00:00+13:00",
  "zone": "Pacific/Auckland",
  "irradiance_source": "ghi",
  "ghi": 600.0,
  "dni": 889.6671607054991,
  "dhi": 102.74230868109538,
  "zenith": 56.01847633648743,
  "azimuth": 89.71062300559339,
  "min_cos_zenith": 0.065,
  "max_zenith": 87.0,
  "poa_global": 798.7724065674765,
  "poa_direct": 671.2496401256591,
  "poa_diffuse": 127.52276644181742,
  "poa_sky_diffuse": 124.96720341349754,
  "poa_ground_diffuse": 2.5555630283198765,
  "aoi": 41.0187153014971,
  "surface_tilt": 15.0,
  "surface_azimuth": 90.0,
  "effective_irradiance": 793.5178842981701,
  "temp_air": 17.0,
  "wind_speed": 2.0,
  "temp_cell": 54.72330083750544,
  "pdc0": 6000.0,
  "age": 5.71937029431896,
  "degradation_factor": 0.9717384619416162,
  "loss_percent": 11.418206895118011,
  "p_dc": 3671.9312828967836,
  "pac0": 5000.0,
  "p_ac": 3533.504207879665,
  "clipping": false
}

Some example expressions with these results are:

Property Property Type Expression Result Comment
watts_expected Instantaneous round(p_ac) 3534 Replaces the Power Property value with a whole number.
watts_expected_dc Instantaneous round(p_dc) 3672 Adds the expected DC power.
irradiance_poa Instantaneous round(poa_global, 1) 798.8 Adds the irradiance on the array.
temp_cell Instantaneous round(temp_cell, 1) 54.7 Adds the cell temperature.
clipping Status clipping ? 1 : 0 0 Adds 1 when the inverter would be clipping, otherwise 0.

Multiple arrays

Each filter models a single array, with one orientation and one DC rating. For a site with several arrays, configure a filter for each array, each with its own Power Property, and add their expected power together with an Expression filter. The filters can share the characteristics common to the arrays through metadata.

One irradiance sensor

When the arrays share one irradiance sensor, each array's filter applies to the same datum. For example, for the east and west arrays in the metadata example, with a weather station's datum stream with the source ID /weather/1:

Filter Settings
PV Expected Power Calculator, for the east array Source ID /weather/1, Alternate Metadata Path /pm/pv-arrays/east, Power Property watts_expected_east
PV Expected Power Calculator, for the west array Source ID /weather/1, Alternate Metadata Path /pm/pv-arrays/west, Power Property watts_expected_west
Expression Source ID /weather/1, with an expression for the watts_expected instantaneous property of watts_expected_east + watts_expected_west

Add the filters to a Filter Chain in that order, so the expression is evaluated after both arrays' expected power has been calculated.

A sensor for each array

When each array has its own irradiance sensor, such as a reference cell in the plane of each array, each array's filter applies to its own sensor's datum. A Join filter can then merge the datum into one, with a Source Property Mapping that gives each array's properties its own name. For example, a mapping Source ID of /weather/(\w+) with a Mapping of {p}_{1} maps the watts_expected property of the /weather/east datum to watts_expected_east. An Expression filter on the Join filter's Output Source ID can then add them together, as above.

Shared inverters

The AC Rating clips an array's expected power at its inverter's limit, but a filter cannot see the other arrays that share the inverter. For arrays that share an inverter, leave the AC Rating empty on each array's filter, and clip the sum of their expected power in the expression instead. For example, for east and west arrays on one 9 kW inverter:

min(watts_expected_east + watts_expected_west, 9000)

Without an AC Rating, an array's expected power clips only when its DC power exceeds its DC Rating, which takes an effective irradiance above about 1130 W/m2 at a cell temperature of 25 °C. The result is close to modelling the arrays and inverter together: for an east-west roof of 6 kW each way, on a clear midsummer day in Auckland, it gave 0.06% less energy on a 9 kW inverter, and 0.18% less on a 7 kW inverter. The difference is from the inverter efficiency, which the filters calculate at each array's load rather than the inverter's total load.

Site export limits

An export limit applies to all of a site's arrays together, so like a shared inverter, it belongs in the expression that adds up their expected power. For example, for a site with five 100 kW inverters and an export limit of 400 kW, configure a filter for each inverter, each with an AC Rating of 100000 and its own Power Property, from watts_expected_1 to watts_expected_5. Then add an Expression filter with these expressions:

Property Property Type Expression
watts_expected Instantaneous watts_expected_1 + watts_expected_2 + watts_expected_3 + watts_expected_4 + watts_expected_5
watts_expected_limited Instantaneous min(watts_expected, 400000)
curtailed Status watts_expected > 400000 ? 1 : 0

The Expression filter evaluates its expressions in order, so each can use the results of those before it. Keeping both expected power values is worthwhile:

  • Comparing the actual power with watts_expected_limited stops curtailment from looking like a fault.
  • The difference between the two, with a Virtual Meter on each, is the energy lost to the limit.
  • curtailed marks the times when individual inverters run below their own expected power.

If the site has its own load, the limit applies to the power exported after that load, so the inverters can generate up to the limit plus the load. For example, with a load meter datum stream /load/1 whose watts property is the site's consumption, the watts_expected_limited expression could be:

hasLatest('/load/1') ? min(watts_expected, 400000 + latest('/load/1').watts) : min(watts_expected, 400000)

A dynamic export limit that is available as a datum property can be read the same way.

AC losses

The expected AC power is at the inverters' output. Which AC losses to add depends on where the actual power you compare it with is measured:

  • From the inverters' own readings: no AC losses apply.
  • From a meter at the grid connection: add the losses in the cables and any transformer between the inverters and the meter.

As in DC wiring, the resistive losses in AC cables grow with the square of the current. For example, for an AC cable loss of 0.5% at 400 kW on the site above, add an expression for the same watts_expected property after the one that adds up the arrays:

watts_expected - 0.005 * watts_expected * watts_expected / 400000

That takes off 0.5% at 400 kW, and 0.25% at 200 kW. Apply any export limit after these losses, as it is the power at the meter that the limit applies to.

Expected energy

A Virtual Meter filter can turn the expected power into expected energy, to compare with the energy an inverter or meter reports. For example, a virtual meter with these settings, on the same datum as the Power Property, adds a wattHours_expected property:

Setting Value
Property watts_expected
Property Type Instantaneous
Reading Property wattHours_expected
Time Unit Hours

Without a Reading Property, the meter's property would be named watts_expectedHours. Add the Virtual Meter after the expected power filters, and any expression that adds them together, in the same Filter Chain.

The expected power is 0 at night, so the meter reading does not advance overnight. If the irradiance sensor stops reporting overnight, the meter reading advances across the gap from the last evening value, which is close to 0, and the virtual meter's Max Age setting stops it advancing across a longer gap.

pvlib server

SolarNodeOS runs a pvlib server on the node, installed with the solarnode-app-datumfilters-pvlib package, which this filter calls at the default Server URL of http://127.0.0.1:8099. The pvlib datum filters share the server, which keeps pvlib loaded so that each calculation is quick.

The server starts when the first request arrives, so the first calculation takes longer, and stops after 30 minutes without a request. If the server cannot be reached, or returns an error, such as for an invalid reading, the filter logs the error and leaves the datum unchanged.

Command

With an empty Server URL, the filter runs the Command for each datum instead, by default /var/lib/solarnode/bin/pv-expected-power. The PV characteristics and the readings are passed to the command as arguments, and the command prints the calculation results as JSON, the same results the server returns. Each run starts Python and loads pvlib afresh, which takes much longer than a request to the server, so the command is best suited to testing. For example, to calculate the expected power of the east array in the metadata example:

/var/lib/solarnode/bin/pv-expected-power --latitude -36.8509 --longitude 174.7645 \
  --zone Pacific/Auckland --array-tilt 15 --array-azimuth 90 --pdc0 6000 \
  --gamma-pdc -0.0035 --racking close_mount_glass_glass --install-date 2021-03-01 \
  --ac-rating 5000 --date 2026-11-19T09:00:00+13:00 --irradiance 600 --temp-air 17 \
  --wind-speed 2

Run the command with --help to see all its options.