Chapter 1
Foundations of AI in Electrical Engineering
Bachelors Program in Electrical Engineering
AI Applications in Electrical Engineering
•
Bachelor
Foundations of AI in Electrical Engineering
Introduction and Context
Electrical engineering has always relied on mathematical models, measurements, feedback, and automated decision-making. Artificial intelligence (AI) extends these capabilities by enabling engineered systems to learn patterns from data, reason under uncertainty, and adapt their actions to changing conditions. In modern power systems, drives, communications networks, robotics, semiconductor manufacturing, and energy management, AI is increasingly used alongside—not instead of—physical laws and engineering expertise.
The central engineering question is not simply whether an AI model can produce an accurate output. It is whether the complete system is safe, explainable enough for its purpose, computationally feasible, robust to unusual conditions, and compliant with technical standards. An AI model may identify a fault accurately in laboratory data yet fail when sensor calibration changes or when the grid operates in a previously unseen configuration. Consequently, AI in electrical engineering should be understood as a systems discipline involving data, models, hardware, control, human supervision, and risk management.
Learning Objectives
After studying this chapter, you should be able to:
Define AI, machine learning, deep learning, and intelligent automation.
Distinguish prediction, classification, clustering, optimization, and control problems.
Explain how data-driven models complement physical and first-principles models.
Identify important AI applications across electrical engineering.
Evaluate limitations involving data quality, generalization, safety, explainability, cybersecurity, and ethics.
Formulate an AI application as an engineering problem with measurable objectives and constraints.
1. Artificial Intelligence as an Engineering Discipline
Artificial intelligence is the broad field concerned with constructing systems that perform tasks commonly associated with human intelligence, such as perception, learning, inference, planning, language processing, and decision-making. The definition is functional rather than biological: an AI system need not think like a human to be useful.
In electrical engineering, AI may operate at several levels:
Perception: extracting voltage, current, vibration, thermal, acoustic, or image features from sensors.
Inference: estimating an unmeasured state, such as rotor position or battery state of charge.
Prediction: forecasting load, renewable generation, equipment temperature, or remaining useful life.
Decision-making: selecting a switching action, maintenance schedule, or charging policy.
Control: changing an actuator command to regulate a physical process.
A useful distinction is between a model and a decision. A model maps inputs to outputs. A decision uses an output, together with objectives and constraints, to select an action. A highly accurate forecast does not automatically produce a good operating policy.
Artificial intelligence, machine learning, and deep learning
AI includes both knowledge-based and data-driven methods. A rule-based protection scheme, for example, can be considered an AI-like decision system when it represents expert knowledge explicitly, although conventional protection engineering does not always use the AI label. Machine learning (ML) is a subset of AI in which a model learns relationships from examples rather than being fully programmed with explicit rules.
Deep learning is a subset of ML based primarily on neural networks with multiple computational layers. Deep networks are effective for high-dimensional data such as waveforms, images, and natural-language records. However, depth alone does not guarantee reliability; the training data, objective function, architecture, and validation procedure remain decisive.
Term
Meaning
Electrical-engineering example
AI
Broad field of intelligent computational behavior
Automated fault diagnosis
Machine learning
Learning model parameters from data
Predicting transformer temperature
Deep learning
ML using multilayer neural networks
Classifying power-quality waveforms
Intelligent automation
Automation that senses, infers, decides, and adapts
Adaptive energy management
Reinforcement learning
Learning actions through interaction and feedback
Battery charging policy
2. Learning Paradigms and Engineering Models
Supervised learning
In supervised learning, the training data contain inputs and desired outputs. For a dataset of N examples, a model f with parameters θ is commonly trained by minimizing a loss:
θ* = arg min_θ (1/N) ∑ᵢ₌₁ᴺ L(f(xᵢ; θ), yᵢ)
Here, xᵢ is an input vector, yᵢ is the measured target, L is a loss function, and θ* is the selected parameter set. The expression assumes that examples are sufficiently representative and that minimizing average training loss is related to performance on future data.
For regression, a common loss is mean squared error:
MSE = (1/N) ∑ᵢ₌₁ᴺ (yᵢ − ŷᵢ)²
where ŷᵢ is the predicted value. If y is measured in amperes, MSE has units of amperes squared. Root mean squared error, RMSE = √MSE, has the same units as the target and is often easier to interpret.
For classification, cross-entropy is frequently used. For binary labels yᵢ ∈ {0,1} and predicted probability pᵢ of class 1:
The logarithm requires probabilities strictly between zero and one. This loss penalizes confident incorrect predictions strongly.
Unsupervised learning
Unsupervised learning uses data without labeled outcomes. Clustering groups observations according to similarity. In k-means clustering, the objective is:
J = ∑ⱼ₌₁ᵏ ∑ₓᵢ∈Cⱼ ||xᵢ − μⱼ||²
where k is the number of clusters, Cⱼ is cluster j, μⱼ is its centroid, and ||·|| is typically Euclidean distance. The method is sensitive to scaling, initialization, outliers, and the selected value of k. A cluster is not automatically a physically meaningful operating mode; engineers must interpret it.
Reinforcement learning
In reinforcement learning, an agent observes a state, selects an action, receives a reward, and updates its policy. This framework can represent energy storage dispatch or robotic motion. It is potentially useful where an accurate analytical policy is difficult to derive, but unsafe exploration on an operating power system is unacceptable. Training is therefore often performed in simulation, with constraints and supervised fallback controllers.
Hybrid and physics-informed approaches
Physical models express conservation laws, circuit relationships, electromechanical dynamics, and device constraints. Data-driven models can represent effects that are difficult to model, such as aging, hysteresis, sensor bias, and complex disturbances. A hybrid model combines both. For example, a battery estimator may use an equivalent-circuit model while learning a correction term from measured data. Such combinations can improve data efficiency and preserve physical plausibility, but they require careful interface design and validation.
3. The Main Problem Types
The first design step is to identify the problem type. Confusing forecasting with control, or classification with anomaly detection, often leads to unsuitable data and metrics.
Prediction or regression
Prediction estimates a numerical quantity. Examples include next-hour demand in megawatts, motor temperature in degrees Celsius, or harmonic magnitude in percent. A point forecast provides one value; a probabilistic forecast provides uncertainty, such as a prediction interval. Forecast accuracy should be assessed on future-like data, not merely on training records.
Classification
Classification assigns an observation to a discrete class. Examples include normal/faulted, insulation-failure type, or operating state. A classifier may output a label or class probabilities. In safety-critical applications, the cost of missed faults and false alarms is usually unequal, so accuracy alone is inadequate.
For a binary classifier:
True positive: a fault is correctly detected.
False positive: a normal condition is incorrectly reported as a fault.
False negative: a fault is missed.
True negative: a normal condition is correctly recognized.
Precision is TP/(TP+FP), while recall is TP/(TP+FN). These expressions assume the denominators are nonzero. The preferred balance depends on the engineering consequence of each error.
Clustering and anomaly detection
Clustering discovers groups without predefined labels. It may reveal typical load profiles or operating regimes. Anomaly detection identifies observations that differ substantially from learned normal behavior. A rare but legitimate operating condition can resemble a fault, so anomaly scores require engineering interpretation and threshold validation.
Optimization
Optimization selects decision variables to minimize or maximize an objective subject to constraints:
minimizex f(x) subject to gᵣ(x) ≤ 0, r = 1,…,m hₛ(x) = 0, s = 1,…,p
Here x is the decision vector, f is the objective, gᵣ are inequality constraints, and hₛ are equality constraints. In electrical engineering, x could contain generator outputs, switching states, charging powers, or conductor dimensions. Constraints may represent power balance, voltage limits, thermal ratings, ramp rates, and binary equipment states.
AI can assist optimization by predicting demand, approximating expensive simulations, or learning promising solutions. It does not remove the need to enforce hard engineering constraints.
Control
Control selects actions over time so that a system follows a reference or remains stable. A simplified discrete-time plant is:
xₜ₊₁ = f(xₜ, uₜ, wₜ)
where xₜ is the state, uₜ is the control input, wₜ represents disturbances, and f describes system evolution. A controller computes uₜ using measured or estimated information. In a proportional-integral controller, for example:
u(t) = Kₚe(t) + Kᵢ ∫₀ᵗ e(τ)dτ
where e(t) is the reference-minus-output error, Kₚ and Kᵢ are gains, and the integral term accumulates error over time. This equation applies to a continuous-time controller under the stated idealized form; actuator saturation, noise, sampling, and integral windup must be handled in practice.
AI-based control can tune parameters, estimate states, or learn a policy. The physical loop still requires stability analysis, limits, fail-safe behavior, and real-time timing guarantees.
4. Intelligent Automation Architecture
Intelligent automation is more than attaching a neural network to a sensor. A practical architecture contains:
Sensing and acquisition: transducers, intelligent electronic devices, cameras, phasor measurement units, and data historians.
Data preparation: time synchronization, filtering, missing-value treatment, scaling, and event labeling.
Inference: a trained model estimates a state, class, forecast, or anomaly score.
Decision logic: the system compares outputs with thresholds, objectives, and constraints.
Actuation: commands are sent to drives, breakers, inverters, relays, or supervisory systems.
Monitoring and governance: performance drift, alarms, access control, audit logs, and human override are maintained.
Architecture of an intelligent electrical engineering automation system
Figure: Architecture of an intelligent electrical engineering automation system
Figure: Closed-loop architecture for intelligent automation in an electrical system.
The deployment location matters. Edge computing places inference near the equipment, reducing latency and dependence on communication links. Cloud computing provides greater storage and centralized training but introduces communication, privacy, and availability concerns. A safety-critical trip function normally requires deterministic protection logic; AI may support diagnosis or maintenance without being the sole trip mechanism.
5. Major Electrical-Engineering Applications
Power and energy systems
AI supports load forecasting, renewable-generation forecasting, demand response, voltage-control assistance, power-quality classification, outage prediction, asset health assessment, and nontechnical-loss detection. In distribution networks, models can estimate unmeasured states using smart-meter and feeder data. In microgrids, optimization can coordinate photovoltaic generation, storage, flexible loads, and backup generators.
Machines, drives, and industrial systems
Motor-current signatures, vibration, temperature, and acoustic signals can support bearing-fault classification and predictive maintenance. AI can estimate torque or rotor position, tune drive controllers, and detect abnormal mechanical loading. Training data must include changes in speed, load, temperature, and sensor condition; otherwise, the model may learn operating regime rather than fault physics.
Power electronics
Converters and inverters operate at high switching frequencies and under changing loads. AI can assist semiconductor thermal prediction, gate-drive fault detection, parameter estimation, modulation optimization, and condition monitoring of capacitors and switches. Real-time execution time and numerical determinism are especially important.
Batteries and electric vehicles
AI applications include state-of-charge and state-of-health estimation, remaining-useful-life prediction, thermal-risk detection, charging optimization, and fleet energy management. Battery behavior depends on temperature, current history, chemistry, age, and manufacturing variation. Models should therefore report uncertainty and be tested across cells and conditions, not just repeated cycles from one laboratory sample.
Communications and signal processing
Machine learning can identify modulation types, suppress interference, detect spectrum occupancy, and classify signals. In these applications, performance depends on signal-to-noise ratio, channel conditions, sampling rate, and adversarial or unintentional interference.
Semiconductor and manufacturing systems
Computer vision detects defects, while predictive models estimate yield and equipment failure. Digital twins can combine process simulation and plant data. Because manufacturing data may be proprietary and distributions change as processes are modified, model versioning and drift monitoring are essential.
6. Worked Example: Formulating Transformer Fault Detection
Consider an illustrative substation transformer-monitoring problem. Sensors provide dissolved-gas measurements, oil temperature, load current, and historical alarms. Engineers want early warning of abnormal thermal or electrical behavior.
Problem formulation. If labeled historical events are available, this is supervised classification: normal versus one or more fault categories. If labels are unreliable, an initial anomaly-detection system may learn normal operating regions, followed by expert review.
Features. Candidate features include gas ratios, temperature rise, rate of temperature change, load factor, and recent alarm counts. Features must be time-aligned and calculated without using information that would only become available after the alarm; otherwise, leakage produces unrealistic test performance.
Data division. Randomly mixing measurements from the same event into training and test sets can exaggerate performance. A time-based or asset-based split is more credible: earlier periods or some transformers are used for development, and later periods or unseen transformers are reserved for testing.
Decision threshold. Let the model output p, the estimated probability of a fault. A threshold selected solely for maximum accuracy may be inappropriate. If missing a developing fault is much more costly than inspecting a false alarm, the threshold may be lowered, subject to alarm workload and maintenance capacity.
Validation. The system should be tested under sensor dropouts, seasonal temperature changes, load changes, communication delays, and previously unseen combinations of conditions. A human engineer should review high-consequence alarms. The model should not directly trip the transformer unless it has passed the required protection and safety validation.
Outcome. A successful deployment is not defined only by a high F1 score. It should reduce unplanned outages or inspection cost, provide sufficient warning time, maintain acceptable false-alarm rates, and remain reliable after sensor replacement and equipment aging.
This case illustrates a general principle: an AI project is an engineered decision process, not merely a model-training exercise.
7. Limitations, Risks, and Responsible Practice
Data limitations
Electrical data are often incomplete, imbalanced, noisy, asynchronous, and biased toward normal operation. Faults are rare, and historical labels may reflect prior human judgments. Sampling changes, sensor replacement, firmware updates, and network outages can create distribution shifts.
Generalization and uncertainty
A model interpolates reliably only within conditions represented by its training data. Extrapolation to a new topology, climate, machine design, or fault mechanism can be unsafe. Engineers should quantify uncertainty where possible, use confidence thresholds, and define a fallback mode. Calibration means that predicted probabilities correspond reasonably to observed frequencies; accuracy and calibration are different properties.
Explainability and accountability
A feature-importance plot is not automatically a causal explanation. For high-consequence decisions, engineers should prefer interpretable models where adequate, physical plausibility checks, local explanations, and traceable records. Responsibility cannot be transferred to an algorithm: organizations must define who approves, monitors, overrides, and audits the system.
Safety and stability
An AI output can be delayed, corrupted, out of range, or unavailable. Safety mechanisms should include input validation, output bounds, watchdog timers, fail-safe defaults, redundant measurements, human override, and conventional protection where appropriate. AI controllers must be evaluated for closed-loop stability, not only offline prediction error.
Cybersecurity and privacy
Connected AI systems enlarge the attack surface. Threats include data poisoning, adversarial inputs, model theft, unauthorized commands, and denial of service. Security practices include authenticated communication, least-privilege access, secure updates, network segmentation, logging, and incident response. Smart-meter and industrial data may also reveal occupancy, production schedules, or commercially sensitive activity.
Ethical and regulatory issues
Although electrical equipment decisions are not always associated with personal data, AI may affect worker safety, service reliability, energy access, and maintenance employment. Governance should address fairness where customers or communities are treated differently, transparency of automated decisions, retention of operational data, and compliance with applicable grid codes, functional-safety standards, cybersecurity requirements, and data-protection law. The exact requirements depend on jurisdiction and application; engineers must consult current standards rather than assume that a general AI guideline is sufficient.
8. Best Practices for an AI Engineering Project
Define the operational decision and its consequences before selecting a model.
Establish a physical and engineering baseline, such as a rule-based detector or conventional forecast.
Collect representative data with reliable timestamps, metadata, and labels.
Separate training, validation, and test data by time, asset, or event where appropriate.
Select metrics that reflect engineering costs, not only average accuracy.
Test rare events, sensor faults, missing data, topology changes, and environmental variation.
Enforce physical constraints and operating limits outside or within the model.
Deploy gradually in shadow mode before allowing automated action.
Monitor drift, latency, calibration, false alarms, and outcomes after deployment.
Maintain model versioning, documentation, rollback capability, and human accountability.
Contemporary Developments
Current research increasingly combines foundation models, edge AI, digital twins, graph neural networks, federated learning, and physics-informed learning. Graph methods are suitable for networked systems because buses, lines, machines, and sensors have relational structure. Federated learning can train across organizations without centralizing raw data, but it does not automatically eliminate privacy leakage or data-quality problems. Digital twins connect simulation with live measurements, while physics-informed methods encourage predictions consistent with known equations. These developments are promising, but engineering validation remains more important than novelty.
Chapter Summary
AI is the broad discipline of building systems that perceive, infer, learn, plan, and act. Machine learning learns relationships from examples, while deep learning uses multilayer neural networks and is especially useful for complex signals and images. Intelligent automation combines sensing, data preparation, inference, constrained decision-making, actuation, and monitoring.
Electrical-engineering AI problems may involve numerical prediction, discrete classification, unsupervised clustering, anomaly detection, constrained optimization, or dynamic control. Each requires suitable data, objectives, validation methods, and performance measures. Physical models and AI models are complementary: physics supplies structure and safety constraints, while data can capture effects that are difficult to model analytically.
Applications span power systems, machines, drives, power electronics, batteries, communications, and manufacturing. Major limitations include poor data, rare faults, distribution shift, uncertainty, lack of explainability, cybersecurity threats, privacy concerns, and unsafe closed-loop behavior. Responsible deployment therefore requires baselines, representative testing, constraint enforcement, monitoring, fallback operation, documentation, and human accountability.
Key Terms
Artificial intelligence: The field of creating systems that perform tasks involving perception, reasoning, learning, or decision-making.
Machine learning: A method in which model parameters are learned from data.
Deep learning: Machine learning based mainly on multilayer neural networks.
Intelligent automation: Automation that senses conditions, infers information, makes decisions, and adapts actions.
Supervised learning: Learning from inputs paired with desired outputs.
Unsupervised learning: Learning patterns from data without labeled outputs.
Reinforcement learning: Learning actions through interaction, rewards, and penalties.
Regression: Prediction of a numerical quantity.
Classification: Assignment of observations to discrete categories.
Clustering: Grouping observations according to similarity.
Anomaly detection: Identification of observations that differ from expected behavior.
Optimization: Selection of variables to improve an objective subject to constraints.
Control: Selection of actions to regulate a dynamic system.
Feature: A measured or derived input used by a model.
Loss function: A numerical measure of model error used during training.
Generalization: Performance on new data or conditions.
Distribution shift: Change between the data used for development and deployment.
Digital twin: A computational representation linked to a physical asset or process.
Edge computing: Processing data near the equipment that generates it.
Model drift: Degradation caused by changing data, equipment, or operating conditions.
Review Questions
Short Answer Questions
Define artificial intelligence, machine learning, and deep learning, and state their relationship.
What is the difference between regression and classification in an electrical-engineering application?
Why can a random train-test split be misleading for time-series equipment data?
State two reasons why physical models remain important when AI is used.
Distinguish precision from recall for a binary fault detector.
Long Answer Questions
Explain the architecture of an intelligent automation system from sensing to actuation and monitoring.
Compare supervised learning, unsupervised learning, and reinforcement learning using electrical-engineering examples.
Discuss how AI can be applied to power-system operation while preserving safety and operating constraints.
Explain the principal sources of model failure after deployment and propose mitigation strategies.
Evaluate the advantages and limitations of hybrid physics-and-data-driven models.
Analytical / Application Questions
A motor-fault classifier performs well on data from one motor but poorly on a different motor design. Diagnose the likely causes and design a validation plan.
Formulate an AI-assisted microgrid energy-management problem by identifying inputs, decisions, objective, constraints, fallback actions, and performance metrics.
A transformer-monitoring model produces many alarms during an unusually hot week. Analyze whether this indicates faults, distribution shift, poor calibration, or sensor problems, and specify the evidence needed to decide.
Multiple Choice Questions with Answers
Question 1
Which statement best describes machine learning?
A. A method that learns model relationships from data
B. A circuit protection standard
C. A physical law governing current flow
D. A replacement for all engineering constraints
Correct Answer: A. A method that learns model relationships from data
Question 2
Predicting the next-hour electrical load in megawatts is primarily which problem type?
A. Classification
B. Regression
C. Clustering
D. Binary control
Correct Answer: B. Regression
Question 3
In a binary fault detector, a false negative occurs when the system:
A. Correctly identifies a fault
B. Reports a fault in a normal system
C. Misses an actual fault
D. Correctly identifies normal operation
Correct Answer: C. Misses an actual fault
Question 4
What is the main purpose of a constraint in an optimization problem?
A. To express permissible operating conditions
B. To guarantee that data are labeled
C. To increase sensor sampling noise
D. To eliminate the objective function
Correct Answer: A. To express permissible operating conditions
Question 5
Which activity is most characteristic of unsupervised learning?
A. Training with labeled fault categories
B. Grouping load profiles without predefined labels
C. Calculating a known circuit impedance
D. Applying a fixed relay setting
Correct Answer: B. Grouping load profiles without predefined labels
Question 6
Why is a time-based test split often appropriate for equipment forecasting?
A. It guarantees zero measurement noise
B. It imitates deployment on future data
C. It removes the need for validation
D. It always increases model accuracy
Correct Answer: B. It imitates deployment on future data
Question 7
If MSE is 9 °C², what is the RMSE?
A. 3 °C
B. 9 °C
C. 81 °C
D. 0.33 °C
Correct Answer: A. 3 °C
Question 8
Which is an example of intelligent automation?
A. A manually recorded voltage reading
B. A fixed resistor in a circuit
C. A system that senses battery condition and adjusts charging within limits
D. An unplugged sensor
Correct Answer: C. A system that senses battery condition and adjusts charging within limits
Question 9
Why can an AI model fail after a sensor is replaced?
A. The model may experience distribution shift
B. Neural networks cannot process numbers
C. Replacement always improves calibration
D. Physical systems stop obeying conservation laws
Correct Answer: A. The model may experience distribution shift
Question 10
Which practice is most appropriate for a safety-critical AI deployment?
A. Allowing unrestricted exploratory actions on the live system
B. Using only training accuracy for approval
C. Providing bounds, fallback logic, monitoring, and human or conventional protection oversight
D. Removing all conventional protection devices
Correct Answer: C. Providing bounds, fallback logic, monitoring, and human or conventional protection oversight
AI Applications in Electrical Engineering
Chapter 1
of 14