Behind-the-Meter (BTM) Optimization refers to the automated, algorithmic dispatch of customer-sited distributed energy resources (DERs)—such as rooftop solar photovoltaic (PV) arrays, battery energy storage systems (BESS), and smart building loads—to achieve specific economic and operational objectives. The core goal is to dynamically balance local generation against consumption in real-time, thereby reducing the site's net load profile as seen by the utility grid and avoiding costly volumetric and demand-based tariff charges.
Glossary
Behind-the-Meter (BTM) Optimization

What is Behind-the-Meter (BTM) Optimization?
Behind-the-Meter (BTM) Optimization is the algorithmic control of energy generation and storage assets located on the customer's side of the utility meter to minimize demand charges and maximize self-consumption.
The optimization engine typically ingests data from interval meter reads, weather forecasts, and time-of-use (TOU) rate structures to solve a constrained dispatch problem, often using model predictive control (MPC) or mixed-integer linear programming (MILP). By executing strategies like peak shaving and solar self-consumption, the system ensures that stored energy is discharged precisely when the marginal value of that kilowatt-hour is highest, effectively transforming a passive building into an economically responsive grid asset without exporting power beyond the point of common coupling.
Key Features of BTM Optimization
Behind-the-Meter optimization relies on a stack of algorithmic and hardware controls to minimize operational expenditure and maximize asset utilization. The following concepts define the technical landscape.
Demand Charge Management
The primary economic driver for BTM storage. Algorithms forecast site load and dispatch batteries to cap the maximum power draw from the grid during a billing interval.
- Peak Shaving: Discharging stored energy precisely when facility load spikes to shave the top off the demand curve.
- Predictive Windows: Using rolling 15-minute interval forecasts to avoid setting a new peak later in the billing cycle.
- Tariff Awareness: The logic ingests complex utility rate structures, including non-coincident demand charges and time-of-use energy rates.
Self-Consumption Maximization
The algorithmic strategy to minimize export to the grid and maximize on-site usage of locally generated solar energy.
- Dynamic Feed-In Management: Throttling inverter output or diverting excess solar to battery storage when export prices are low or grid constraints exist.
- Load Following: Scheduling deferrable loads (e.g., EV charging, HVAC pre-cooling) to align with the solar generation profile.
- Zero Export Profiles: Enforcing strict limits at the point of common coupling to comply with utility interconnection agreements.
Time-of-Use (TOU) Arbitrage
The automated cycling of battery energy storage to exploit differential energy pricing across the day.
- Charge Scheduling: Importing and storing energy during low-cost off-peak periods (typically overnight).
- Discharge Dispatch: Injecting stored energy to serve site load during high-cost on-peak windows.
- Degradation-Aware Cycling: The optimization engine factors in the marginal cost of battery degradation to ensure the arbitrage spread remains profitable.
Grid Services Participation
Enabling BTM assets to bid into wholesale markets or utility programs for revenue stacking.
- Frequency Regulation: Autonomous response to grid frequency deviations using fast-ramping battery inverters.
- Demand Response (OpenADR 2.0b): Receiving automated dispatch signals to curtail load or export power during grid stress events.
- Spinning Reserve: Maintaining a reserved capacity in the battery that can be discharged instantly to support the grid.
Dynamic Operating Envelope Adherence
The real-time constraint management ensuring BTM operations do not violate the utility's dynamic connection limits.
- Import/Export Limits: The controller respects time-varying kW limits broadcast by the distribution utility to prevent voltage violations.
- Volt-Watt and Volt-VAR Curves: Smart inverters autonomously adjust active and reactive power based on local terminal voltage measurements.
- Anti-Islanding Compliance: Continuous monitoring to ensure the system ceases to energize within 2 seconds of a grid outage per IEEE 1547.
Model Predictive Control (MPC) Engine
The advanced mathematical core that optimizes BTM dispatch over a receding time horizon.
- State Forecasting: Predicts future solar generation, load, and energy prices using machine learning models.
- Constraint Solving: Uses Mixed-Integer Linear Programming (MILP) to solve the unit commitment problem while respecting battery state-of-charge limits.
- Real-Time Feedback: Re-optimizes the dispatch plan every few minutes to correct for forecast errors and unexpected load changes.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about algorithmic control of energy assets located on the customer's side of the utility meter.
Behind-the-Meter (BTM) optimization is the algorithmic coordination of energy generation, storage, and consumption assets located on the customer's side of the utility meter to minimize electricity costs and maximize self-consumption. The system ingests real-time data from smart meters, battery management systems, and solar inverters, then solves a constrained optimization problem—typically using Mixed-Integer Linear Programming (MILP) or Model Predictive Control (MPC)—to determine the optimal dispatch schedule. The primary objective is to reduce demand charges, which are fees based on a customer's peak power draw during a billing interval, by discharging a Battery Energy Storage System (BESS) precisely when site load spikes. Secondary objectives include Time-of-Use (TOU) rate arbitrage, where the battery charges during low-price periods and discharges during high-price periods, and maximizing the self-consumption of on-site solar generation to avoid export penalties under Net Energy Metering (NEM) regimes.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Mastering Behind-the-Meter optimization requires understanding the interconnected hardware, protocols, and economic signals that govern the customer-sited energy landscape.
Peak Shaving Algorithm
A control logic that dispatches battery energy storage to discharge during periods of highest site load, thereby reducing the maximum demand charge levied by the utility. The algorithm analyzes historical load profiles and real-time meter data to predict the optimal discharge window. Key characteristics include:
- Target: Minimize the highest 15-minute interval kW reading in a billing cycle
- Method: Forecasts load spikes using regression models and pre-charges the battery from solar or off-peak grid power
- Result: Can reduce demand charges by 30-70% for commercial and industrial customers
Time-of-Use (TOU) Rate Arbitrage
The strategy of charging a battery energy storage system during low-price off-peak periods and discharging it during high-price on-peak periods to capture the energy cost differential. This exploits the temporal spread in volumetric energy rates. The optimization engine must account for:
- Round-trip efficiency losses (typically 85-95%)
- Battery degradation costs per cycle
- Solar generation forecasts to avoid charging when PV is abundant
- Dynamic tariff structures with seasonal and hourly variations
Smart Inverter Control
The autonomous adjustment of a distributed energy resource's real and reactive power output based on local voltage and frequency measurements. Modern smart inverters certified under UL 1741 SB execute mandatory grid-support functions including:
- Volt-VAR mode: Absorbs reactive power when voltage is high, injects when low
- Frequency-Watt mode: Reduces active power output as grid frequency rises above nominal
- Volt-Watt mode: Curbs active power export when local voltage exceeds a threshold
- Ramp rate controls: Limits the rate of power change to prevent voltage flicker
Customer Baseline Load (CBL) Calculation
A statistical methodology that estimates what a customer's energy consumption would have been without a demand response event, used to calculate incentive payments. Common methods include:
- 10-of-10 Baseline: Averages the 10 highest usage days from the prior 10 non-event days
- Matching Day Baseline: Uses consumption from the most recent comparable day with similar weather and occupancy
- Regression-Based Baseline: Fits a model using temperature, time-of-day, and day-type variables Accurate CBLs are critical for performance-based compensation in virtual power plant programs.
Dynamic Operating Envelope
A time-varying import and export capacity limit calculated by the distribution utility for a specific grid connection point. Unlike static connection agreements, DOEs enable higher DER penetration by dynamically managing constraints:
- Calculation: Based on real-time state estimation of the low-voltage network
- Communication: Sent to the DER management system via IEEE 2030.5 or OpenADR
- Benefit: Allows customers to export more energy during low-congestion periods while enforcing strict limits only when the network is constrained
- Outcome: Maximizes BTM asset utilization without triggering voltage or thermal violations
Model Predictive Control (MPC) for Microgrids
An advanced optimization strategy that uses a dynamic model of the microgrid to forecast future states and determine the optimal dispatch schedule over a receding time horizon. Unlike simple rule-based controllers, MPC:
- Solves a constrained optimization problem at each time step
- Incorporates forecasts of load, solar generation, and energy prices
- Accounts for battery state-of-charge dynamics and degradation
- Handles multi-objective trade-offs between cost, comfort, and resilience This is the gold standard for commercial BTM optimization when paired with Mixed-Integer Linear Programming (MILP) solvers.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us