Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
Energy Management
Initializing search
    bf-dev
    • Home
    • Process
    • Products
    • Reference
    • Decisions
    • Work
    • Operations
    bf-dev
    • Home
      • Process Handbook
      • BetterFleet Workflow Map
      • Product Development System
      • Product Engineering Workflow
        • Process Workflows
        • Work Intake and Weekly Planning
        • Product Engineering Workflow in Linear
        • Product Engineering Delivery
        • Agent Guidance
        • Workflow
        • Skills
        • Skill Sources
        • Process Guides
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
        • Process Templates
        • Release Plan: <title>
      • Process Publishing
      • Product overview
        • General Reference
          • Core Domain Training
          • System Topology
          • Two-Axis Ontology Model
          • Ontology Primer
          • Worked Example
          • Evidence, Ownership, and Lineage
          • Energy Management
            • Energy System Model
            • Demand And Supply
            • Energy Management Sub-Domains
            • Microgrid And Operating Envelopes
            • Microgrid Topology And Constraint Evaluation
            • Operating-Envelope Lifecycle
            • Cost And Carbon
            • Control Strategies
            • Relation To Product Domains
          • Standards and Protocol Map
          • Charging, Roaming, and Commercial Model
          • Charge Planning and Operations
          • Cross-Cutting Domains
          • Domain Coverage Matrix
        • BetterFleet Product Ontology
        • Core Operations Data Ontology
        • BetterFleet R&D Plan
        • Index
        • Architecture
        • Manage Product Capabilities
        • Manage Data and State
        • Manage Service Interaction Flows
        • Manage Reference
        • Manage Internal Application Diagrams
          • Manage Authorization And Permissions
          • bf-manage-core Auth and Authorization Model
          • Manage Authorization and Permissions
          • bf-manage-web Auth and Permission Model
          • Manage Service Catalog
          • bf-depot-sim
          • bf-digital-twin (Manage Role)
          • bf-fleet-health
          • bf-manage-connect
          • bf-manage-core
          • bf-manage-incidents
          • bf-manage-roaming
          • bf-manage-sitepwrmon
          • bf-manage-web
          • bf-schedule-creator (Manage Role)
          • bf-support-microsite
          • bf-telematics
        • Index
        • Architecture
        • Plan Reference
        • Plan Internal Application Diagrams
        • Plan Migration and Flags
        • Plan Simulation Request Lifecycle
          • Plan Service Catalog
          • bf-bnl-schedule-analysis-compute
          • bf-bnl-settings
          • bf-bnl-ui
          • bf-digital-twin (Plan Role)
          • bf-route-modelling
          • bf-schedule-creator (Plan Role)
      • Where to Ask Product Questions
      • Reference
        • Platform Reference
        • Platform Architecture
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repository Map
        • Monolithic Git Transition FAQ
        • Monolithic Git Sizing
        • CI and Release Integration
        • Shared Reference
        • Shared Infrastructure Architecture
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • System Reference
        • Cloud Data Dependencies
        • Ports and URLs
        • Service Matrix
          • API Docs
          • OCPI API Docs
          • OCPP API Docs
          • OSCP API Docs
          • VDV API Docs
          • Yard State API Docs
        • System Design
        • System Design: BBA Microgrid Controller Generic Packet Translation
        • System Design: Depot Simulation
        • System Design: IoT Sensor Packet
        • System Design: Microgrid Energy Orchestration
          • System Design: OCPP Profile 3 And ISO 15118 PKI
          • Architecture: BetterFleet OCPP Profile 3 and ISO 15118 PKI
          • Specification: BetterFleet OCPP Profile 3 and ISO 15118 Certificate Lifecycle Management
          • System Design: On-Prem Control
          • Challenge
          • Specification: BetterFleet On-Prem Continuity Control
          • System Design: OSCP
          • OSCP Protocol Documentation
          • Depot Sim Testing Requirements
          • System Design: OSCP Flexibility Provider Domain
      • Decisions
        • Architecture Decision Records
        • 0001 - Record architecture decisions
        • 0002 - Cognito for Authentication and Authorisation
        • 0003 - AWS Amplify for Authentication
        • 0004 - DynamoDB for default database
        • 0005 - Data Persistence
        • 0006 - Trunk-Based Development
        • 0007 - Generalised principle for automation
        • 0008 - Naming Repositories, Services, and URLs
        • 0009 - Use Timezone Aware DateTimes and UTC
        • 0010 - Use semantic release
        • 0011 - Centralized feature flag repository
        • 0012 - Use Named Exports in Storybook
        • 0013 - RESTful TITLE GraphQL
        • 0014 - Service Granularity
        • 0015 - Async/co-routine exception handling pattern
        • 0016 - Logging & log levels
        • 0017 - Instantiated Models
        • 0018 - Repository Pattern for Database Access
        • 0019 - Use of Design Tokens in TypeScript React Application
        • 0020 - API backwards compatibility and versioning
        • 0021 - Alembic Migration strategy
        • 0022 - Consistent react-hook-form usage
        • 0023 - Domain Event-Driven Architecture
        • 0024 - Domain Event Bus Tech Stack
        • 0025 - No enum types in DB table columns
        • 0026 - In-Memory Ormar Stores for Repository testing
        • 0027 - Storing Tab State in Query and Local Storage
        • 0028 - Adopt OpenTelemetry Semantic Conventions for Structured Logging
        • 0029 - Adopt RFC 9457 for HTTP Error Responses
        • 0030 - Use GitLab registry and Terraform state for ECS services
        • 0031 - Adopt DDD, Hexagonal Architecture, and CQRS for Python Domain Services
      • Work
        • Active Work
          • Work: Bba Microgrid Controller
          • Implementation Specification: BBA Microgrid Controller
          • BBA Microgrid Controller Deliverables (Stories)
          • Work: BFDev Monolithic Git
          • Challenge
          • Specification: BFDev Monolithic Git v2
          • BFDev Monolithic Git v2 Stories
          • Work: Complex Circuit Load Balancing
          • Implementation Specification: Complex Circuit Load Balancing
          • Complex Circuit Load Balancing Deliverables (Stories)
            • COR-10 and COR-11 Consolidation Review
          • Work: Dispatch Reliability and Reconciliation
          • Challenge
          • Specification: Dispatch Reliability and Reconciliation
          • Dispatch Reliability and Reconciliation (Unit User Stories)
            • Dispatch populated vehicle cards grey surface snapshot
            • Dispatch Visual Review
          • Work: Enable Scheduled Managed Charger Access
          • Challenge: Enable Scheduled Managed Charger Access
          • Specification Exploration Dossier: Enable Scheduled Managed Charger Access
          • Specification Review: Enable Scheduled Managed Charger Access
          • Specification: Enable Scheduled Managed Charger Access
          • Work: Guided Cut-Off and Release Orchestration
          • Specification: Guided Cut-Off and Release Orchestration
          • Guided Cut-Off and Release Orchestration (Unit User Stories)
          • Work: Production Deployment Validation
          • Challenge
          • Work: Scheduled Report Parity
          • Specification: Scheduled Report Parity
          • Work: Telematics
          • Telematics EventBridge Path
          • Telematics Ingress Architecture
          • Specification: Telematics Migration into bf-manage-core with 5-Minute Freshness and Health Visibility
          • Telematics Core Migration MVP (Implementation-Time BDD)
          • Work: Vector Derms
          • Implementation Specification: Vector DERMS
          • Vector DERMS Deliverables (Stories)
          • Work: Visiting Vehicle Charging Visibility
          • Specification: Visiting Vehicle Charging Visibility
          • Visiting Vehicle Charging Visibility (Unit User Stories)
          • Work: Workspace Owned Stripe Roaming
          • Specification: Workspace-Owned Stripe Credentials for Roaming Payments
        • Backlog Work
          • Work: Microgrid
          • Microgrid Backlog Stories
          • Work: Mobile Ops Companion
          • Challenge
          • Specification: Mobile Operations Companion v1
          • Mobile Operations Companion Deliverables (Stories)
          • Work: Oscp
          • OSCP Backlog Stories
        • Archived Work
          • Work: Code Canonical Orchestration
          • Challenge
          • Specification: Product Engineering Workflow
          • Product Engineering Workflow Deliverables (Unit User Stories)
          • Work: Release Notes Automation
          • Release Plan: Release Notes Automation
          • Release Notes Automation Backlog Stories
      • Operations
      • Onboarding Runbook
        • Operations Runbooks
        • Production Hotfix Release
        • Staging Hotfix Release
        • Manage Staging Release Validation
        • Terraform Plan Dry Runs
        • Operations Tooling
        • Code Indexing
        • Operations Evidence
        • Database Restoration Test Report
      • Daily Operations Runbook
      • Testing Guide
      • Troubleshooting
    • Energy System Model
    • Demand And Supply
    • Energy Management Sub-Domains
    • Microgrid And Operating Envelopes
    • Microgrid Topology And Constraint Evaluation
    • Operating-Envelope Lifecycle
    • Cost And Carbon
    • Control Strategies
    • Relation To Product Domains
    1. Home
    2. Products
    3. General
    4. Core Domain Training
    general reference

    Energy Management¶

    Energy management is the domain that decides how physical energy, electrical limits, price, carbon, and grid obligations affect fleet charging.

    In the two-axis model:

    • problem coordinate: Energy & Cost Management -> Site Energy & Infrastructure or Energy & Cost Management -> Advanced Energy & Grid
    • physical coordinate: grid connection, microgrid, meter, circuit, charger, EVSE, connector, storage, generation, site load, tariff, operating envelope, and time

    In the ontology it sits around three concepts:

    • energy system: the supply side and its constraints
    • energy requirement: the demand side created by future fleet work
    • charging: the allocation mechanism between demand and supply

    Energy System Model¶

    flowchart TB
      Grid["Grid connection"]
      Generation["Local generation"]
      Storage["Battery storage"]
      SiteLoad["Non-EV site load"]
      Microgrid["Microgrid<br/>topology, nodes, limits"]
      Chargers["Chargers / EVSEs / connectors"]
      Vehicles["Vehicles"]
      Metering["Meters and telemetry"]
      Envelope["Operating envelopes<br/>grid or DERMS constraints"]
    
      Grid --> Microgrid
      Generation --> Microgrid
      Storage --> Microgrid
      SiteLoad --> Microgrid
      Envelope --> Microgrid
      Microgrid --> Chargers
      Chargers --> Vehicles
      Microgrid --> Metering
      Chargers --> Metering

    The energy system includes:

    • energy sources: grid import, local generation, storage discharge
    • energy resources: chargers, storage, controllable site assets
    • topology: how grid connections, circuits, chargers, and site loads relate
    • power state: current demand, available capacity, committed capacity, curtailed capacity
    • energy state: stored energy and useful remaining energy
    • constraints: grid limits, circuit limits, charger limits, policy limits, operating envelopes
    • quality state: outage, stale telemetry, degraded control, derating, fallback mode

    Demand And Supply¶

    Energy management is useful only when it compares demand with supply.

    flowchart LR
      Work["Future work"]
      Requirement["Energy requirement<br/>kWh, deadline, margin"]
      Demand["Charging demand<br/>vehicles competing for power"]
      Supply["Available supply<br/>capacity, cost, carbon, constraints"]
      Policy["Energy policy<br/>priority, safety, tariff, carbon"]
      Allocation["Charging allocation"]
      Outcome["Outcome<br/>readiness, cost, carbon, compliance"]
    
      Work --> Requirement
      Requirement --> Demand
      Supply --> Allocation
      Demand --> Allocation
      Policy --> Allocation
      Allocation --> Outcome

    The same vehicle can be urgent from an operations view and expensive from an energy view. The product has to make that tradeoff explicit.

    Energy Management Sub-Domains¶

    Problem coordinate Physical coordinate Main question Typical inputs Typical outputs
    Energy & Cost Management -> Site Energy & Infrastructure grid connection, microgrid, circuit, meter, site load, charger, time What can the site safely supply now and later? grid import limit, circuit capacity, topology, metering, site load, charger ratings available capacity, effective circuit capacity, site load state, limit breach state
    Energy & Cost Management -> Advanced Energy & Grid DERMS, operating envelope, storage, generation, tariff, carbon factor, time How should external grid, DER, storage, price, and carbon signals shape charging? OSCP forecasts, tariffs, demand charges, carbon factors, storage state, generation forecast operating envelopes, charge windows, load shift decisions, flexibility measurements

    Microgrid And Operating Envelopes¶

    The microgrid model is the physical energy-system model. It represents the site as a rooted electrical-node tree and applies constraints at the right node.

    An operating envelope is a time-bounded constraint that can come from an external party, such as a DERMS through OSCP. BetterFleet's design keeps OSCP outside the microgrid model. OSCP translates protocol messages into protocol-neutral operating envelopes.

    sequenceDiagram
      participant DERMS as Grid / DERMS capacity provider
      participant OSCP as OSCP domain
      participant MG as Microgrid
      participant SC as Smart charging
      participant Charger as Chargers
    
      DERMS->>OSCP: capacity forecast for group
      OSCP->>OSCP: resolve group binding
      OSCP->>MG: submit operating envelope
      MG->>SC: effective capacity and constraints
      SC->>Charger: charging profiles or limits
      Charger->>SC: meter and status evidence
      SC->>MG: demand and measurements
      MG->>OSCP: measurements / compliance signals

    Important rules:

    • external protocol identity belongs in the adapter domain
    • the microgrid owns physical topology and generic constraint state
    • smart charging reads effective capacity and applies charger-level limits
    • reports and support views need lineage from envelope to allocation to session outcome

    Microgrid Topology And Constraint Evaluation¶

    The microgrid is a rooted electrical tree. Limits can apply at the site root, a grid connection, a circuit, a charger group, or a charger/EVSE node. A safe allocation has to satisfy the target node and its ancestors.

    flowchart TB
      Site["Microgrid<br/>depot electrical system"]
      GridA["GRID_CONNECTION<br/>import limit / envelope target"]
      GridB["GRID_CONNECTION<br/>second supply boundary"]
      CircuitA["Circuit / feeder<br/>node limit"]
      CircuitB["Circuit / feeder<br/>node limit"]
      ChargerA["Charger group<br/>allocation scope"]
      ChargerB["Charger group<br/>allocation scope"]
      EVSE1["EVSE / connector<br/>session demand"]
      EVSE2["EVSE / connector<br/>session demand"]
      SiteLoad["Non-EV site load"]
      Meter["Meter and telemetry point"]
    
      Site --> GridA
      Site --> GridB
      GridA --> CircuitA
      GridA --> SiteLoad
      GridA --> Meter
      CircuitA --> ChargerA
      CircuitA --> ChargerB
      ChargerA --> EVSE1
      ChargerB --> EVSE2
      GridB --> CircuitB

    Constraint evaluation should answer these questions in order:

    1. Which node does the command or envelope target?
    2. Which ancestor limits also apply?
    3. Is telemetry fresh enough to trust measured demand?
    4. Which fallback demand should be used when telemetry is stale?
    5. What allocation is still safe after the envelope, node limits, charger limits, and policy limits are combined?

    Operating-Envelope Lifecycle¶

    An operating envelope is time-bounded. It may be received before it is active, become active at a block boundary, expire, be withdrawn, or fall back under policy when the source is unavailable.

    stateDiagram-v2
      [*] --> Received
      Received --> Pending: valid future window
      Received --> Active: valid now
      Pending --> Active: activation time reached
      Active --> Expired: validity window ended
      Active --> Withdrawn: source withdraws envelope
      Active --> FallbackEligible: primary source stale or offline
      FallbackEligible --> ActiveFallback: fallback policy applies
      ActiveFallback --> Active: fresh primary envelope received
      ActiveFallback --> Expired: fallback validity ended
      Expired --> [*]
      Withdrawn --> [*]

    Degraded-control rules matter because smart charging must fail toward a safe allocation. The support and reporting views should expose whether a limit came from a fresh envelope, fallback envelope, static node limit, charger limit, or stale-data policy.

    Cost And Carbon¶

    Cost and carbon are energy-management concerns because they affect when and how charging should happen.

    Concept Meaning Product use
    Utility tariff Cost of energy from the site's energy supplier session cost reporting, charge-window decisions, cost comparison
    Public or roaming tariff Price charged to a driver or visiting fleet access, billing, CDR, settlement
    Demand charge Cost based on peak demand in a billing window peak management, load smoothing, site capacity policy
    Carbon factor Emissions intensity for energy use CO2e reporting, carbon-aware planning
    Time-of-use window Price or capacity changes by time planned charging, overnight charging, peak avoidance

    Utility tariffs and roaming tariffs are related, but they serve different jobs. A utility tariff explains what the site pays for energy. A roaming tariff explains what a user or partner is charged for a session.

    Control Strategies¶

    Energy management influences charging through strategies such as:

    • keep total site load under a hard limit
    • reserve capacity for non-EV site load
    • prioritise vehicles with the nearest work deadline
    • move non-urgent charging into lower-cost or lower-carbon windows
    • reduce charging when a grid envelope tightens
    • recover gracefully when telemetry is stale or a charger cannot accept a command
    • publish measurements or compliance evidence to an external grid party

    Relation To Product Domains¶

    Energy management overlaps with several domains:

    • Smart Charging applies the control decision to chargers and connectors.
    • Operations & Dispatch supplies the work context and vehicle readiness need.
    • Roaming & Shared Charging may add commercial access and pricing constraints.
    • Incidents & Notifications explains when energy control degrades or fails.
    • Reporting & Insights proves cost, carbon, capacity, and charging outcomes.
    • Resilience & Security defines safe fallback when control or data is uncertain.
    Made with Material for MkDocs
    BFDev Docs Assistant
    New conversation?
    Ask one focused question at a time, this helps the assistant provide accurate answers about what's been implemented in BetterFleet.