Interval Calculations

Prev Next

Overview

Interval Calculations are a type of Calculated Point in Bazefield that compute values at fixed time intervals using the Bazefield Calculation Service. These calculations are ideal for generating time-based KPIs, summaries, and performance metrics that are stored for historical analysis and reporting.


Key Characteristics

  • Scheduled Execution: The calculation runs at regular intervals (e.g., every 5 or 15 minutes).

  • Expression-Based Logic: Uses arithmetic, built-in functions, and references to other points.

  • Recalculable: Logic can be updated and recalculated at any time, over any time period.

  • Long-Term Storage: Results are saved to the Bazefield IMATIS database or an external database like PostgreSQL.

Interval Calculations provide enough functionality for most KPIs but if more complexity is required for the use case, a Calculation Model may be a better fit.


Examples

ℹ️ Average Active Power (5-minute interval)

A point named ActivePowerAvg is configured for a Wind Turbine model as follows:

  • Point Type: CALCULATED_POINT

  • Script Type: Interval_Calculation

  • Expression: ([@ActivePower]) == 0 ? Double.NaN : TagTimeAvg([@ActivePower]:[Double.NaN])

  • Interval: 300 seconds (5 minutes)

  • SaveAtIntervalStart: True (to log the output timestamp at the beginning of the interval)

  • Data Template: IMATIS (interval data should be stored in the Bazefield IMATIS database)

This configuration will output NaN if there are no raw ActivePower values in the last 5 minutes, and the time-weighted average of the raw ActivePower values in the last 5 minutes otherwise.

ℹ️ Energy Produced in Last 5 minutes

A point named TotalEnergyProduced.5m is configured for a Wind Turbine model as follows:

  • Point Type: CALCULATED_POINT

  • Script Type: Interval_Calculation

  • Expression: {TagTimeAvg([@ActivePower]:[Double.NaN])/12}

  • Interval: 300 seconds (5 minutes)

  • SaveAtIntervalStart: True (to log the output timestamp at the beginning of the interval)

  • Data Template: IMATIS (interval data should be stored in the Bazefield IMATIS database)

This configuration will compute the time-weighted average of the raw ActivePower values in the last 5 minutes, then divide by 12 to convert from kW to kWh (there are 12 5-minute periods in 1 hour). This is an estimation but a rather accurate one.

ℹ️ Turbine Capacity Factor

A point named Capacity is configured for a Wind Turbine model as follows:

  • Point Type: CALCULATED_POINT

  • Script Type: Interval_Calculation

  • Expression: {100 * Max(TagLast([@ActivePowerAvg]:[Double.NaN]), 0) / GetAttribute(“ratedPower”)}

  • Interval: 300 seconds (5 minutes)

  • SaveAtIntervalStart: True (to log the output timestamp at the beginning of the interval)

  • Data Template: IMATIS (interval data should be stored in the Bazefield IMATIS database)

This configuration build on the ActivePowerAvg point by retrieving its last value (setting it to 0 if it is negative), then dividing this by the Turbine’s ratedPower attribute. Finally, this value is multiplied by 100 to get a percent Capacity Factor.


Key Benefits

✔️ Historical Insight: Enables trend analysis and long-term performance tracking.

✔️ Custom KPIs: Tailor calculations to your operational goals.

✔️ Database Integration: Store results in the Bazefield database or external systems for BI/reporting.

✔️ Scalable: Apply across fleets, technologies, and vendors.


When to Use Interval Calculations

Use Interval Calculations when:

  • You need aggregated values over time (e.g., averages, totals).

  • You want to store regularly-spaced results for dashboards, reports, or compliance.

  • Real-time updates are not required for the use case.