Chapter 14
Digital Energy Management, Analytics and AI
Bachelors Program in Electrical Engineering
Energy Management & Auditing
•
Bachelor
Digital Energy Management, Analytics and AI
Introduction
Energy management is increasingly becoming a data and control problem as well as an electrical engineering problem. Conventional audits rely on periodic meter readings, equipment inventories, interviews and sampled measurements. Digital energy management extends this practice through continuous sensing, automated data acquisition, networked control, analytics and artificial intelligence (AI). The objective is not merely to collect more data. It is to convert trustworthy data into decisions that reduce energy use, cost, emissions and operational risk without compromising safety, comfort, production or power quality.
A modern digital energy-management system may combine smart meters, submeters, Internet of Things (IoT) sensors, supervisory control and data acquisition (SCADA), building-management systems, cloud platforms, forecasting models, anomaly detection and optimization algorithms. These technologies operate across different time scales: protection and control may act in milliseconds, supervisory control in seconds or minutes, and strategic analysis over hours, days or years.
Digitalization introduces new responsibilities. Engineers must understand measurement uncertainty, data quality, communication protocols, cybersecurity, model validation, privacy, human oversight and the limits of automated control. A sophisticated dashboard cannot compensate for a poorly calibrated meter or an invalid baseline.
Learning Objectives
After studying this chapter, the reader should be able to:
Explain the architecture and roles of smart meters, IoT platforms and SCADA systems.
Distinguish operational data, contextual data and derived energy indicators.
Construct appropriate energy baselines and performance metrics.
Explain forecasting, anomaly detection and AI-assisted optimization methods.
Evaluate interoperability, cybersecurity, model validation and human-oversight requirements.
Design a practical digital energy-management workflow and assess its limitations.
Decision and governance layer: operators, energy managers, maintenance staff, management policies and cybersecurity controls.
Data should move upward for monitoring and analysis, while validated commands move downward only within authorized operating limits. Safety functions must not depend on a cloud connection or an unverified AI recommendation.
Layered digital energy management architecture
Figure: Layered digital energy management architecture
Figure: Functional layers of a digital energy-management system.
Smart meters and IoT sensing
A smart meter records energy or power at defined intervals and communicates measurements automatically. A submeter may measure a distribution board, production line, chiller, air-handling unit or tenant. IoT sensors extend measurement to temperature, humidity, occupancy, pressure, flow, vibration, valve position and equipment status.
Measurement intervals should match the decision being made. Fifteen-minute data may support demand-charge analysis, whereas second-level data may be needed to diagnose compressor cycling. Higher frequency is not automatically better: it increases storage, communication and processing requirements and may expose noise that is mistaken for meaningful behavior.
For an interval of duration ∆t, energy is approximated from average real power P̄ by:
E ≈ P̄ × ∆t
If P̄ is in kilowatts and ∆t is in hours, E is in kilowatt-hours. The approximation is appropriate when the interval is sufficiently short or when average power is measured correctly. For varying power, the general relationship is:
E = ∫t₁t₂ P(t) dt
where P(t) is real power in watts and time is in hours or seconds consistently. Meter firmware normally performs this integration or accumulation.
SCADA and historians
SCADA supervises geographically distributed or industrial assets. It commonly provides process visualization, alarms, trends, set-point management and event logging. A historian stores time-stamped operational data, often with compression and quality flags. SCADA is principally an operational technology (OT) system; a cloud analytics platform is principally an information technology (IT) system. Connecting them requires a controlled interface rather than unrestricted network access.
Cloud dashboards and edge computing
Cloud platforms offer scalable storage, remote access, fleet comparison and computational resources. Edge computing processes data near the equipment, reducing latency and maintaining local operation during communication loss. A resilient design often uses edge control with cloud-based reporting and model training. Cloud dashboards should show data quality, timestamp, unit, confidence and comparison baseline—not only attractive charts.
2. Data Engineering and Interoperability
Energy data has at least three categories:
Category
Examples
Typical use
Operational
kW, kWh, voltage, temperature, valve state
Control and diagnosis
Contextual
weather, occupancy, production, tariff, schedules
Normalization and forecasting
Derived
energy intensity, baseline deviation, carbon emissions
Evaluation and reporting
Interoperability means that systems can exchange and correctly interpret information. It has technical, syntactic and semantic dimensions. A protocol may successfully transfer a number while the receiving system still misinterprets whether it represents watts or kilowatts, instantaneous power or interval energy, local time or UTC.
Common technologies include Modbus, BACnet, OPC UA, MQTT and web APIs. Protocol choice should consider determinism, security, device support, bandwidth, lifecycle and vendor dependence. A practical information model defines asset identity, point name, unit, direction, scaling, timestamp, quality code and calibration status. Naming conventions and metadata catalogs are as important as communication protocols.
A data-quality process should detect:
missing, duplicated or out-of-order timestamps;
impossible values, such as negative consumption where no reverse flow is possible;
stuck sensors and excessive flat-line duration;
sudden scale changes caused by configuration errors;
clock drift and daylight-saving-time ambiguity;
communication outages and substituted values.
Missing data must not be silently replaced. Imputation can be useful for exploratory analysis, but reported savings should identify imputed intervals and estimate their uncertainty.
3. Metrics, Baselines and Measurement and Verification
A digital system should connect measurements to decisions. Common indicators include total energy, peak demand, load factor, energy intensity, cost, emissions and avoided energy. Load factor over a period is:
LF = E / (Pₘₐₓ × T)
where E is energy in kWh, Pₘₐₓ is maximum demand in kW and T is the period in hours. LF is dimensionless and lies between 0 and 1 when the same interval and demand definition are used. It indicates how evenly capacity is used; it is not itself an efficiency measure.
Energy intensity may be expressed as:
I = E / Q
where E is energy and Q is a meaningful activity measure, such as floor area, tonnes of product or passenger-kilometres. The denominator must be stable, relevant and independently measured.
A baseline estimates expected consumption under specified conditions in the absence of an intervention. A simple regression baseline can be written as:
Êt = β₀ + β₁ HDDt + β₂ CDDt + β₃ Qt + β₄ St
Here Ê_t is predicted energy for period t; HDD and CDD are heating- and cooling-degree-day variables; Q is production or occupancy; S represents schedule or categorical effects; and β values are fitted coefficients. The model assumes that the selected variables explain important variation and that the relationship remains sufficiently stable. It should not be used outside the range of conditions represented in the training data without validation.
Estimated avoided energy is commonly:
Eavoided,t = Êbaseline,t − Ereported,t
Savings claims require careful measurement and verification. A negative result may indicate deterioration, unusual weather, production changes or model error—not necessarily failure of the project. Baselines should be frozen or governed after an intervention; otherwise the model may learn the intervention itself and conceal savings.
4. Forecasting and Anomaly Detection
Forecasting supports procurement, battery scheduling, demand response and maintenance planning. Methods range from persistence models and moving averages to regression, exponential smoothing, ARIMA, gradient-boosting models and recurrent neural networks. Complexity should be justified by improved validated performance and operational value.
A useful forecasting error measure is mean absolute error:
MAE = (1/n) ∑ᵢ₌₁ⁿ |yᵢ − ŷᵢ|
where yᵢ is the observed value, ŷᵢ is the forecast and n is the number of test observations. MAE has the same units as the forecast variable. Root mean square error is:
RMSE = √[(1/n) ∑ᵢ₌₁ⁿ (yᵢ − ŷᵢ)²]
RMSE penalizes large errors more strongly than MAE. Models must be tested on future-like data using a chronological holdout or rolling-origin evaluation; random shuffling can leak future information into training.
Anomaly detection identifies observations or patterns inconsistent with expected behavior. Rule-based methods are transparent: a chiller may be flagged when it operates outside scheduled hours or when supply temperature remains above a limit. Statistical methods use residuals, control charts or robust limits. Machine-learning methods include clustering, isolation forests and autoencoders.
An anomaly is not automatically a fault. It may reflect a valid operating change, sensor error, weather event or production requirement. Alarms should therefore include severity, persistence, probable cause, affected energy, recommended action and a mechanism for operator feedback.
5. AI-Assisted Optimization
Optimization selects operating decisions subject to technical and organizational constraints. For example, a battery schedule may minimize energy cost while respecting state of charge, power and availability limits:
minimize Σₜ [cₜ Pₜ + cᵈ D]
subject to:
0 ≤ SOCₜ ≤ SOCₘₐₓ
Pₜ ≤ Pₘₐₓ
where cₜ is the time-varying energy price, Pₜ is grid import, cᵈ is a demand-charge coefficient, D is billing-period maximum demand and SOC is state of charge. Additional constraints describe battery energy balance, charging efficiency, comfort, equipment ramp rates, minimum run times and safety limits. The optimization is meaningful only when forecasts, tariffs and constraints are reliable.
AI may assist by predicting load, estimating equipment efficiency, ranking faults or proposing set points. Reinforcement learning can learn control policies through interaction, but unrestricted exploration is unsuitable for safety-critical facilities. A safer arrangement is constrained or offline learning followed by simulation, shadow-mode testing and limited deployment.
Human oversight should be designed into the system. Operators must be able to inspect the recommendation, understand its basis, reject it, override it and recover manually. Responsibility cannot be transferred to an algorithm.
6. Model Validation and Governance
Validation asks whether a model is fit for its intended use. It includes:
Data validation: units, completeness, accuracy, synchronization and sensor calibration.
Statistical validation: error on unseen data, bias, stability and uncertainty.
Physical validation: consistency with conservation laws, equipment ratings and operating principles.
Operational validation: safe behavior under realistic disturbances and communication failures.
Post-deployment validation: drift detection, periodic recalibration and review of false alarms.
A model that predicts well may still be unsuitable for control. For example, a forecast can have low average error but produce unsafe peak recommendations. Validation should therefore use scenario tests, boundary tests and fail-safe tests.
Model governance requires version control, documented training data, feature definitions, approval records, change management and audit logs. Data and models should have owners. A model card or technical record should state purpose, assumptions, exclusions, performance, known failure modes and monitoring requirements.
7. Cybersecurity and Ethical Issues
Connected energy systems expand the attack surface. Threats include credential theft, ransomware, manipulated sensor data, unauthorized set-point changes, denial of service and supply-chain compromise. Consequences may include production interruption, unsafe conditions, equipment damage, privacy loss and inaccurate energy reporting.
A defense-in-depth program includes asset inventories, network segmentation between IT and OT, least-privilege access, multifactor authentication where practical, secure remote access, patch management, backups, logging, intrusion monitoring and tested incident-response procedures. Controllers should fail to a safe state, and essential local control should remain available when external services fail.
Encryption protects data in transit and at rest, but it does not replace identity management or secure configuration. Default passwords, shared accounts and undocumented remote connections are unacceptable in professionally managed systems.
Ethical concerns include occupant privacy, surveillance through occupancy data, inequitable comfort outcomes, opaque automated decisions and exaggerated savings claims. Data minimization, purpose limitation, access control and transparent communication are important. AI should support professional judgment rather than obscure accountability.
8. Illustrative Case Study: Digital Optimization of a University Engineering Building
Background
This illustrative case concerns a four-storey engineering building with laboratories, offices and teaching spaces. The building had a whole-building electricity meter, but no reliable submeters. Complaints included overheated rooms, simultaneous heating and cooling, and high evening consumption.
Problem
Monthly bills could identify cost but not causes. Manual inspection found that air-handling units were sometimes enabled overnight and that occupancy schedules differed between the building-management system and room bookings. The energy team needed evidence before changing control sequences.
Analysis
The team installed submeters on major air-handling units, chilled-water pumps and laboratory exhaust systems. Temperature, carbon-dioxide concentration, occupancy schedules and outdoor weather were added as contextual data. A gateway transmitted time-synchronized data to a historian, while local controllers retained authority over safety and comfort limits.
The baseline model used outdoor temperature, occupancy and laboratory operating hours. Data quality checks identified a current-transformer scaling error on one submeter; the record was corrected before model fitting. A rolling forecast was evaluated using MAE and compared with a simple persistence forecast. The more complex model was retained only where its improvement justified maintenance cost.
Anomaly rules flagged operation outside schedule, persistent high fan power and simultaneous heating and cooling. Each alert was reviewed by an operator before intervention. The team then used constrained optimization to recommend start times and supply-air set points, subject to minimum ventilation, temperature limits, equipment availability and laboratory safety requirements.
Approach and outcome
The recommendations were first operated in shadow mode for four weeks. Engineers compared predicted effects with actual conditions and found that one laboratory required an extended purge period that was absent from the schedule data. After correcting the schedule, automated recommendations were enabled for selected air-handling units, with operator override and a manual fallback.
The principal outcome was not a single universal percentage saving. It was a controlled process: trusted measurement, validated baseline, explainable alerts, safe trials and continuing review. Evening operation declined, comfort complaints were investigated with measured evidence, and the energy team gained a repeatable method for identifying faults. Savings were reported with data-quality qualifications rather than attributed automatically to AI.
Learning points
Instrumentation and metadata preceded analytics.
A physically plausible model was more useful than an opaque high-accuracy model with poor transferability.
Human review prevented a scheduling error from becoming a comfort or safety problem.
Local controls and fallback operation preserved resilience.
Digital energy management is an organizational process, not merely a software purchase.
9. Implementation Roadmap and Best Practices
A practical implementation can proceed as follows:
Define business, operational and energy objectives.
Inventory assets, meters, networks, data owners and existing controls.
Establish a measurement plan based on decisions, not curiosity.
Standardize point names, units, timestamps, quality flags and metadata.
Secure gateways and segment IT and OT networks.
Begin with transparent dashboards, validated rules and baseline models.
Test forecasting and anomaly models chronologically and physically.
Introduce optimization in advisory or shadow mode.
Approve constrained automation only after safety and failure testing.
Monitor model drift, cybersecurity events, user feedback and realized outcomes.
The most important best practice is proportionality. A small facility may need secure submetering and rule-based analysis rather than an elaborate AI platform. Conversely, a large industrial site may justify high-frequency sensing, digital twins and advanced optimization. Technology should follow the decision problem.
Challenges and Limitations
Digital systems face sensor cost, calibration drift, missing data, inconsistent naming, vendor lock-in, communications failure and cybersecurity exposure. AI models may inherit historical bias, fail under changing weather or production conditions, and generate false alarms. Correlation does not prove that an intervention caused savings. Digital twins may be expensive to build and maintain, especially when equipment configurations change.
There are also organizational limitations. Operators may distrust recommendations, maintenance teams may lack time to respond, and procurement may prioritize installation over lifecycle support. A system without ownership, training and response procedures becomes an abandoned dashboard. Finally, energy optimization cannot override electrical protection, process safety, statutory requirements or human welfare.
Chapter Summary
Digital energy management integrates measurement, communication, control, analytics and human governance. Smart meters and IoT sensors provide operational and contextual data; SCADA and local controllers maintain real-time supervision; historians and cloud or edge platforms support analysis. Baselines and measurement-and-verification methods convert raw data into defensible performance assessments. Forecasting supports planning, while anomaly detection identifies deviations that require engineering interpretation. AI-assisted optimization can coordinate loads, storage and generation, but only within explicit physical, operational and safety constraints.
Interoperability depends on shared semantics as well as protocols. Cybersecurity requires defense in depth, and model validation must address statistical, physical and operational fitness. Human oversight, transparent assumptions, auditability and fallback control are essential. The effective digital energy engineer is therefore both a systems engineer and a critical evaluator of data, models and organizational consequences.
Key Terms
Smart meter: A communicating meter that records and transmits energy measurements.
Submeter: A meter serving a defined circuit, process, equipment group or tenant.
IoT platform: A system for connecting, storing and processing data from networked devices.
SCADA: Supervisory control and data acquisition for monitoring and controlling industrial or infrastructure processes.
Historian: A time-series database specialized for operational data.
Interoperability: The ability of systems to exchange and correctly interpret information.
Data quality: The completeness, accuracy, consistency, timeliness and validity of data.
Energy baseline: Expected energy use under defined conditions before or without an intervention.
Measurement and verification: A structured process for determining project performance and savings.
Forecasting: Estimating future energy or power from historical and contextual data.
Anomaly detection: Identification of observations or patterns inconsistent with expected behavior.
Digital twin: A data-connected representation of a physical asset or system used for analysis or decision support.
Optimization: Selection of decisions that best satisfy an objective subject to constraints.
Model drift: Decline in model validity as operating conditions or data relationships change.
Edge computing: Processing data near its source rather than exclusively in a remote cloud.
Defense in depth: Multiple complementary cybersecurity protections.
Human oversight: Structured ability of people to review, approve, reject or override automated decisions.
Load factor: Average load divided by maximum demand over a specified period.
Energy intensity: Energy consumption divided by a relevant activity measure.
Review Questions
Short Answer Questions
What are the five functional layers of a digital energy-management architecture?
Why are metadata and semantic consistency important for interoperability?
Distinguish an anomaly from a confirmed equipment fault.
State two reasons for using edge computing.
Why must a baseline be validated after an energy intervention?
Long Answer Questions
Explain how smart meters, SCADA, historians and cloud dashboards work together in a digital energy-management system.
Compare rule-based, statistical and machine-learning approaches to anomaly detection.
Discuss the requirements for validating an AI model intended to recommend equipment set points.
Explain a defense-in-depth cybersecurity strategy for a connected industrial energy system.
Describe how human oversight should be incorporated into AI-assisted energy optimization.
Analytical / Application Questions
A facility records average demand of 240 kW for 12 hours and 180 kW for the next 12 hours. Its peak demand is 300 kW. Calculate daily energy and load factor, stating assumptions.
Design a data and control architecture for a campus battery used for tariff reduction and demand response. Identify measurements, constraints, cybersecurity controls and fallback behavior.
An anomaly detector reports high overnight consumption after a production schedule changes. Explain how you would determine whether the event is a genuine fault, a valid operating condition, a data error or a model failure.
Multiple Choice Questions with Answers
Question 1
Which component normally retains immediate local control when cloud communication is unavailable?
A. Local controller or PLC
B. Cloud dashboard
C. Monthly billing database
D. External reporting portal
Correct Answer: A. Local controller or PLC
Question 2
If average power is 50 kW for 3 hours, the approximate energy is:
A. 16.7 kWh
B. 53 kWh
C. 150 kWh
D. 1,500 kWh
Correct Answer: C. 150 kWh
Question 3
Which metric has the same units as the forecast variable?
A. Mean absolute error
B. Load factor
C. Coefficient of determination
D. Correlation coefficient
Correct Answer: A. Mean absolute error
Question 4
What is the principal danger of randomly shuffling time-series data before splitting training and test sets?
A. It guarantees underfitting
B. It may leak future information into training
C. It removes all missing values
D. It prevents model calibration
Correct Answer: B. It may leak future information into training
Question 5
Which item is contextual rather than operational data?
A. Motor current
B. Valve position
C. Outdoor temperature
D. Instantaneous real power
Correct Answer: C. Outdoor temperature
Question 6
A baseline is primarily used to:
A. Replace electrical protection
B. Estimate expected use for comparison with reported use
C. Encrypt meter data
D. Determine a device IP address
Correct Answer: B. Estimate expected use for comparison with reported use
Question 7
Which practice best supports interoperability?
A. Using undocumented point names
B. Allowing every device to use a different unit
C. Defining shared asset, unit, timestamp and quality metadata
D. Removing timestamps to reduce storage
Correct Answer: C. Defining shared asset, unit, timestamp and quality metadata
Question 8
Why should AI optimization include explicit constraints?
A. To ensure recommendations respect technical and safety limits
B. To eliminate the need for measurements
C. To guarantee zero forecast error
D. To make all decisions irreversible
Correct Answer: A. To ensure recommendations respect technical and safety limits
Question 9
Which is an example of defense in depth?
A. One shared password for all operators
B. Network segmentation combined with access control and monitoring
C. Disabling all event logs
D. Connecting OT directly to the public internet
Correct Answer: B. Network segmentation combined with access control and monitoring
Question 10
What does human oversight allow an operator to do?
A. Ignore all physical constraints
B. Review, approve, reject or override automated recommendations
C. Guarantee that sensors never fail
D. Replace every local safety function with AI
Correct Answer: B. Review, approve, reject or override automated recommendations