Optimization, Decision Support and Digital TwinsIntroduction and ContextElectrical engineering systems are increasingly operated under uncertainty, multiple constraints, and competing objectives. A distribution utility may need to reduce losses while improving reliability; a power-system operator must schedule generation while respecting network limits; an industrial facility may replace equipment only when the expected cost of failure exceeds the cost of intervention. These are optimization and decision-support problems. Artificial intelligence extends conventional engineering analysis by learning patterns from data, estimating uncertain quantities, and searching large solution spaces. However, engineering decisions cannot depend only on statistical accuracy. They must also satisfy physical laws, safety requirements, economic constraints, cybersecurity policies, and regulatory obligations. Digital twins provide an important bridge: they connect physical assets with continuously updated digital models for monitoring, prediction, simulation, and decision support. This chapter develops mathematical, heuristic, and multi-objective optimization methods; introduces digital-twin architectures; and explains how physics-informed AI supports scenario analysis, techno-economic evaluation, and asset management. Learning ObjectivesBy the end of this chapter, students should be able to: - Formulate electrical-engineering design, scheduling, and maintenance problems as optimization models.
- Distinguish linear, nonlinear, mixed-integer, heuristic, and multi-objective optimization.
- Explain objective functions, decision variables, constraints, feasibility, and Pareto optimality.
- Apply optimization to generation scheduling, network operation, storage, and asset management.
- Describe the architecture and lifecycle of a digital twin.
- Explain how physics-informed machine learning combines measurements with governing equations.
- Evaluate solutions using technical, economic, environmental, reliability, and ethical criteria.
- Identify limitations, risks, and governance requirements for AI-enabled engineering decisions.
1. Optimization as an Engineering ActivityOptimization is the systematic selection of decision variables to obtain the best feasible outcome according to a stated objective. A general constrained optimization problem is written as: minimize or maximize f(x) subject to gi(x) ≤ 0, i = 1, …, m hj(x) = 0, j = 1, …, p x ∈ X Here, x is the vector of decision variables, f(x) is the objective function, gi(x) are inequality constraints, hj(x) are equality constraints, and X defines variable domains such as bounds or integer restrictions. A solution is feasible if it satisfies every constraint. The optimal solution is the best feasible solution according to the objective. For example, a generator-dispatch problem may minimize fuel cost: C(P) = a + bP + cP² where P is generator output in megawatts and a, b, and c are cost coefficients. The quadratic model is an approximation valid over the generator’s operating range; it should not be extrapolated beyond that range. Typical engineering decision variables include: - generator outputs and commitment states;
- transformer tap positions;
- capacitor-bank switching states;
- conductor sizes and equipment ratings;
- battery charge and discharge power;
- maintenance dates and replacement decisions;
- locations and capacities of distributed energy resources.
1.1 Objective Functions and ConstraintsAn objective must reflect the decision-maker’s purpose. Common electrical-engineering objectives include energy cost, power loss, emissions, voltage deviation, interruption cost, investment cost, and risk of failure. A basic power-balance constraint for a single time period is: ∑Pg + Pimport = Pload + Ploss where Pg is the output of generator g, Pimport is imported power, Pload is demand, and Ploss is network loss. All terms must use the same power unit, such as MW. For a battery, a simplified state-of-charge model is: Et+1 = Et + ηc Pc,t∆t − (Pd,t∆t)/ηd where Et is stored energy, Pc,t and Pd,t are charging and discharging power, ηc and ηd are efficiencies, and ∆t is the time interval. The model assumes constant efficiencies and neglects degradation, temperature dependence, and self-discharge unless additional terms are included. Typical constraints are: 0 ≤ Pc,t ≤ Pcmax 0 ≤ Pd,t ≤ Pdmax Emin ≤ Et ≤ Emax A model that omits operational limits may produce a mathematically attractive but physically impossible result. 2. Main Classes of Optimization2.1 Linear and Nonlinear OptimizationLinear programming is appropriate when the objective and constraints are linear. It is computationally efficient and useful for approximate energy-market and resource-allocation models. Nonlinear programming is required when relationships include products, squares, trigonometric terms, or nonlinear physical equations. AC power-flow optimization is nonlinear because voltage magnitudes and angles interact through trigonometric relationships. 2.2 Mixed-Integer OptimizationMany engineering decisions are discrete. A circuit breaker is open or closed; a generator is committed or not committed; a transformer may have a finite set of tap positions. Mixed-integer programming represents such decisions using integer or binary variables. A unit-commitment model may use binary variable ug,t, where 1 means generator g is online at time t and 0 means it is offline. Binary variables can express minimum up-time, startup, and shutdown requirements, but they increase computational difficulty. The resulting model is often a mixed-integer linear program (MILP) or mixed-integer nonlinear program (MINLP). 2.3 Dynamic OptimizationWhen decisions affect future states, optimization is dynamic. Examples include battery scheduling, reservoir operation, and condition-based maintenance. A dynamic model consists of a state equation: xt+1 = F(xt, ut, wt) where xt is the system state, ut is the control or decision, and wt represents disturbances such as demand or weather. Model predictive control repeatedly solves an optimization problem over a future horizon, implements the first action, measures the new state, and then solves again. 2.4 Heuristic and Metaheuristic MethodsExact mathematical methods may become impractical for large, discontinuous, or poorly modelled problems. Heuristics use problem-specific rules, while metaheuristics provide general search strategies. Examples include genetic algorithms, particle swarm optimization, simulated annealing, and ant-colony optimization. A genetic algorithm typically performs the following steps: - Encode candidate solutions as chromosomes.
- Generate an initial population.
- Evaluate each candidate using an objective or fitness function.
- Select stronger candidates.
- Apply crossover and mutation.
- Replace the population and repeat until a stopping condition is met.
Metaheuristics do not generally guarantee a global optimum. Their strengths are flexibility and the ability to search nonconvex spaces. Their weaknesses include sensitivity to parameters, stochastic variability, and difficulty proving solution quality. A professional study should report random seeds, stopping criteria, constraint-handling rules, and comparison with a baseline or exact method. 3. Multi-Objective Optimization and Decision SupportElectrical decisions rarely have one objective. Reducing operating cost may increase emissions or reduce reserve margin. Installing more equipment may improve reliability but increase capital expenditure. A weighted-sum formulation is: minimize J(x) = w₁ f₁(x) + w₂ f₂(x) + … + wk fk(x) where fi(x) are normalized objectives and wi are nonnegative weights. Normalization is essential when objectives have different units. One common min–max transformation is: fiN(x) = (fi(x) − fimin)/(fimax − fimin) The selected reference values must be documented because they influence the result. A solution is Pareto-optimal if no objective can be improved without worsening at least one other objective. The set of such solutions is the Pareto frontier. Decision support does not end when the frontier is calculated. Engineers and stakeholders must select a preferred compromise using priorities, risk tolerance, regulation, and technical judgment. The ε-constraint method optimizes one objective while placing bounds on others: minimize f₁(x) subject to f₂(x) ≤ ε₂, …, fk(x) ≤ εk This approach is often more interpretable when a decision-maker can state requirements such as “annual emissions must be below a specified limit.” 4. Applications in Electrical Engineering4.1 Generation and Storage SchedulingScheduling determines when resources operate and at what output. A simplified daily operating cost is: Ctotal = ∑t=1T [∑g=1G Cg(Pg,t) + Cstart,g yg,t + Cstop,g zg,t] where T is the number of time intervals, Cg is generation cost, yg,t and zg,t indicate startup and shutdown, and Cstart,g and Cstop,g are associated costs. The model must also include demand balance, generator limits, ramp rates, reserve requirements, and minimum up/down times. Renewable uncertainty can be handled through scenarios. If scenario s has probability ps, expected cost is: E[C] = ∑s=1S ps Cs This expected-value approach is useful but may hide severe low-probability outcomes. Chance constraints, robust optimization, or explicit worst-case analysis may be needed where reliability is critical. 4.2 Distribution-Network ReconfigurationNetwork reconfiguration changes switch states to reduce losses, restore supply, or improve voltage. Constraints include radiality, thermal ratings, voltage limits, and connectivity. A solution that reduces losses but creates an energized loop may be unacceptable if the network is designed for radial operation. 4.3 Asset ManagementAsset management combines condition monitoring, failure prediction, maintenance planning, and investment decisions. A useful quantity is the expected cost of a decision: E[C] = Cpreventive + Pfailure Cfailure + Cdowntime where Pfailure is the estimated probability of failure during the planning period. This is a simplified expression. Real analyses may include inspection cost, residual value, discounting, dependencies among assets, and uncertainty in the probability estimate. For discounted cash flow, net present value is: NPV = −I₀ + ∑t=1T CFt/(1+r)t where I₀ is initial investment, CFt is net cash flow in period t, and r is the discount rate per period. All cash flows must be expressed in consistent monetary units and the discount period must match the cash-flow interval. 5. Digital TwinsA digital twin is a digital representation of a physical asset, process, or system that is linked to the physical entity through data and can support monitoring, prediction, simulation, or control. A static engineering model is not automatically a digital twin. The twin requires an operational connection, a defined purpose, and a process for updating model states or parameters. A practical architecture contains: - Physical layer: generators, motors, transformers, sensors, actuators, and communication equipment.
- Data layer: time-series measurements, event logs, inspection records, weather data, and asset registers.
- Model layer: first-principles equations, reduced-order models, simulation software, and machine-learning models.
- Analytics layer: anomaly detection, state estimation, forecasting, optimization, and uncertainty quantification.
- Decision layer: recommendations, alarms, maintenance plans, control actions, and economic evaluations.
- Governance layer: identity management, cybersecurity, data quality, version control, validation, and audit records.
The twin may operate at different levels: component, subsystem, plant, feeder, or entire grid. The level should match the decision. A motor bearing twin may need vibration data at high frequency, while a transmission-planning twin may use hourly or seasonal data. 5.1 Digital-Twin LifecycleThe lifecycle normally includes requirement definition, asset identification, data acquisition, model development, calibration, validation, deployment, monitoring, and retirement. Calibration adjusts uncertain parameters using observed data. Validation tests performance on data or operating conditions not used for calibration. A twin should expose confidence information. A predicted temperature of 90 °C is not equivalent to a prediction of 90 ± 1 °C and a prediction of 90 ± 20 °C. Uncertainty may arise from sensor noise, missing data, parameter uncertainty, model simplification, and unforeseen operating conditions. 6. Physics-Informed AIPurely data-driven models can perform well within the range represented in their training data but fail under unusual operating conditions. Physics-informed AI incorporates known physical relationships into training or inference. For a supervised model with prediction loss Ldata, a physics-informed objective may be: Ltotal = Ldata + λ Lphysics + β Lboundary where Lphysics penalizes violation of governing equations, Lboundary penalizes violation of boundary or initial conditions, and λ and β control the relative importance of these terms. The terms must be scaled carefully; otherwise one loss may dominate numerically. For example, a model predicting a network state can be penalized for violating power balance, voltage limits, or conservation laws. Physics-informed models are not automatically correct: incorrect equations, poor parameter estimates, biased sensors, and inappropriate boundary conditions can still produce misleading outputs. Physics-informed approaches include: - hybrid models combining simulation and machine learning;
- neural networks constrained by differential equations;
- surrogate models trained on high-fidelity simulations;
- state estimators using measurements and physical network models;
- residual-learning models that predict the difference between a baseline model and observations.
7. Worked Example: Battery SchedulingConsider a battery with energy capacity 10 MWh, charging efficiency 0.90, discharging efficiency 0.90, and a one-hour interval. During one hour, it charges at 4 MW. The increase in stored energy is: ∆E = ηc Pc ∆t = 0.90 × 4 MW × 1 h = 3.6 MWh If its initial state of charge is 5 MWh, the final state is 8.6 MWh, which remains below the 10 MWh limit. If instead it discharges at 3 MW for one hour, the reduction in stored energy is: ∆E = (Pd∆t)/ηd = (3 MW × 1 h)/0.90 = 3.33 MWh Thus, a starting energy of 8.6 MWh becomes approximately 5.27 MWh. The energy delivered to the grid is 3 MWh, while the battery loses approximately 0.33 MWh in discharge losses. This distinction is essential in both optimization and economic evaluation. 8. Illustrative Case: Digital Twin for a Distribution TransformerBackground. A utility operates a 20 MVA distribution transformer supplying an industrial area. It has temperature, load-current, dissolved-gas-analysis, and ambient-temperature measurements. Problem. The utility experiences high summer loading and wants to reduce failure risk without replacing healthy transformers prematurely. Historical records are incomplete, and a binary alarm based only on temperature produces many false warnings. Analysis. Engineers create a twin containing a thermal model, an asset database, sensor-quality checks, and a machine-learning anomaly detector. The thermal model estimates expected hot-spot temperature from load and ambient temperature. The anomaly model examines residuals between measured and expected behavior. Maintenance alternatives are evaluated using expected failure cost, inspection cost, loading restrictions, and replacement cost. Approach. The system first validates sensor timestamps and identifies missing values. A physics-based model supplies baseline temperature estimates. A learning model predicts residual behavior and assigns an anomaly score. Optimization then selects among inspection, temporary loading reduction, oil treatment, or replacement. Constraints include maximum allowable temperature, required service availability, crew capacity, and annual maintenance budget. Outcome. In this illustrative scenario, the utility does not rely on the anomaly score alone. A high score triggers engineering review, and recommendations are accepted only when sensor quality is adequate and the thermal model is within its validated operating range. The decision process reduces unnecessary interventions while prioritizing assets with simultaneous thermal and gas-analysis evidence. Learning points. A digital twin is a decision system rather than merely a dashboard. Combining physical models with AI improves interpretability, but validation, uncertainty reporting, and human accountability remain necessary. 9. Techno-Economic and Engineering Decision SupportDecision-support systems should present alternatives, assumptions, constraints, uncertainty, and consequences. They should not conceal value judgments inside an unexplained score. A techno-economic evaluation may combine: - capital expenditure and operating expenditure;
- energy purchase and sales revenue;
- reliability benefits and avoided interruption cost;
- emissions cost or carbon intensity;
- equipment lifetime and degradation;
- financing assumptions and discount rate;
- sensitivity to demand, fuel prices, weather, and failure rates.
Sensitivity analysis changes one or more assumptions to determine whether the preferred decision is robust. If a small change in electricity price reverses the ranking of alternatives, the recommendation should be presented as conditional rather than certain. Scenario analysis explores plausible futures, such as high electrification, low renewable output, equipment outage, or extreme weather. Scenarios should not be confused with predictions. They are structured ways to test resilience. 10. Limitations, Ethics, and GovernanceOptimization can produce undesirable outcomes when the objective is incomplete. Minimizing cost may increase emissions, reduce redundancy, or transfer risk to vulnerable customers. A technically feasible solution may violate safety rules or social expectations. Important governance practices include: - traceable data provenance and model versions;
- access control and cybersecurity for operational technology;
- independent validation before deployment;
- human approval for high-consequence actions;
- monitoring for model drift and sensor failure;
- documented assumptions and uncertainty;
- protection of commercially sensitive and personal data;
- compliance with electrical safety, grid-code, privacy, and AI-governance requirements.
Cybersecurity is especially important because a compromised twin may issue unsafe recommendations or provide attackers with a detailed map of critical infrastructure. Network segmentation, authentication, encryption, secure updates, and incident response are engineering requirements, not optional software features. Common technical limitations include poor observability, nonstationary demand, biased failure records, computational burden, incompatible data formats, and the gap between simulated and real operating conditions. AI should therefore augment—not replace—engineering judgment, operational procedures, and regulatory accountability. 11. Best Practices for Engineering Implementation- Define the decision, time horizon, stakeholders, and acceptable risk before selecting an algorithm.
- Formulate physical constraints explicitly and use consistent units.
- Establish a simple baseline before deploying complex AI.
- Separate training, validation, and test data by time or operating condition where appropriate.
- Test feasibility independently of the optimization software.
- Compare heuristic solutions with bounds, benchmarks, or alternative methods.
- Report uncertainty, sensitivity, and failure cases.
- Keep humans in the loop for safety-critical recommendations.
- Version data, models, parameters, and optimization settings.
- Recalibrate and revalidate the twin when equipment, sensors, firmware, or operating policy changes.
Chapter SummaryOptimization converts engineering goals and physical restrictions into structured decision problems. Linear, nonlinear, mixed-integer, dynamic, heuristic, and multi-objective methods address different model characteristics. Multi-objective optimization exposes trade-offs through weighted objectives, ε-constraints, and Pareto frontiers. Applications include generation scheduling, storage operation, network reconfiguration, investment planning, and predictive asset management. Digital twins connect physical assets, data, models, analytics, and decisions. Physics-informed AI improves generalization by incorporating conservation laws and engineering constraints, but it still requires careful calibration and validation. Techno-economic analysis should include lifecycle costs, reliability, uncertainty, and sensitivity. Safe deployment requires cybersecurity, governance, transparent assumptions, human accountability, and continuous monitoring. Key TermsOptimization: Selection of the best feasible decision according to an objective. Objective function: Mathematical representation of the quantity to minimize or maximize. Decision variable: A controllable quantity selected by the optimization model. Constraint: A mathematical or operational restriction on feasible decisions. Feasible solution: A solution satisfying all model constraints. Mixed-integer optimization: Optimization containing continuous and discrete variables. Heuristic: A problem-solving rule designed to find a good solution efficiently. Metaheuristic: A general search strategy such as a genetic algorithm or simulated annealing. Pareto-optimal solution: A solution that cannot improve one objective without worsening another. Digital twin: A connected digital representation of a physical asset or system. State estimation: Calculation of system states from measurements and a model. Physics-informed AI: AI trained or constrained using physical laws or engineering relationships. Surrogate model: A computationally efficient approximation of a more expensive model. Scenario analysis: Evaluation of decisions under several plausible future conditions. Techno-economic analysis: Joint evaluation of technical performance and economic consequences. Net present value: Discounted value of future cash flows minus initial investment. Asset management: Coordinated lifecycle management of physical infrastructure and risk. Model drift: Reduction in model validity as data or operating conditions change. Uncertainty quantification: Characterization of confidence, variability, and possible error in results. Review QuestionsShort Answer Questions- What distinguishes a feasible solution from an optimal solution?
- Why are binary variables useful in generation scheduling?
- Define Pareto optimality.
- What makes a digital twin different from a static simulation model?
- State two reasons why physics-informed AI may be preferable to a purely data-driven model.
Long Answer Questions- Explain how objective functions and constraints are formulated for a battery-scheduling problem.
- Compare exact optimization, heuristics, and metaheuristics in terms of guarantees, flexibility, and computational effort.
- Describe the architecture and lifecycle of a digital twin for an electrical asset.
- Explain how techno-economic analysis can influence the selection of a maintenance strategy.
- Discuss cybersecurity, transparency, and human accountability in AI-enabled grid decision support.
Analytical / Application Questions- Formulate a multi-objective optimization problem for locating electric-vehicle charging stations, including cost, voltage quality, and accessibility objectives.
- A utility must choose between preventive replacement and continued operation of a transformer. Identify the required data, objective function, constraints, uncertainty sources, and validation steps.
- Design a digital-twin workflow for a photovoltaic-plus-storage plant that must forecast output, detect abnormal behavior, and schedule charging while respecting battery and grid constraints.
Multiple Choice Questions with AnswersQuestion 1Which condition defines a feasible optimization solution? A. It achieves the lowest possible objective value without constraints. B. It satisfies all specified constraints. C. It uses only integer variables. D. It is obtained using a heuristic algorithm. Correct Answer: B. It satisfies all specified constraints. Question 2In the battery equation Et+1 = Et + ηc Pc,t∆t − (Pd,t∆t)/ηd, what does ηc represent? A. Charging efficiency B. Discharging power C. Stored energy capacity D. Time-step duration Correct Answer: A. Charging efficiency Question 3A Pareto-optimal solution is one for which: A. All objectives have identical numerical values. B. No objective can improve without worsening at least one other objective. C. Only the economic objective is minimized. D. All constraints are removed. Correct Answer: B. No objective can improve without worsening at least one other objective. Question 4Which problem most clearly requires mixed-integer optimization? A. Estimating ambient temperature from weather data B. Selecting a generator output when output is continuous only C. Choosing whether a generator is online or offline D. Calculating a continuous voltage drop Correct Answer: C. Choosing whether a generator is online or offline Question 5What is the principal role of a digital twin? A. To replace all physical sensors permanently B. To provide a connected digital representation for monitoring, prediction, simulation, or decisions C. To guarantee that every prediction is correct D. To eliminate engineering models Correct Answer: B. To provide a connected digital representation for monitoring, prediction, simulation, or decisions Question 6If a battery charges at 4 MW for 1 hour with charging efficiency 0.90, how much stored energy is added? A. 2.50 MWh B. 3.60 MWh C. 4.00 MWh D. 4.44 MWh Correct Answer: B. 3.60 MWh Question 7In a physics-informed loss Ltotal = Ldata + λLphysics + βLboundary, the physics term is used to: A. Increase the number of sensors automatically B. Penalize violations of governing physical relationships C. Convert all variables into binary values D. Remove the need for validation Correct Answer: B. Penalize violations of governing physical relationships Question 8Which is a limitation of metaheuristic optimization? A. It can never handle discrete variables. B. It always proves global optimality. C. Its results may depend on parameters and stochastic search behavior. D. It cannot optimize engineering problems. Correct Answer: C. Its results may depend on parameters and stochastic search behavior. Question 9What does net present value account for? A. Only equipment weight B. The discounted value of future cash flows and initial investment C. Only annual energy consumption without financial assumptions D. Only failure probability Correct Answer: B. The discounted value of future cash flows and initial investment Question 10Why should uncertainty be reported in digital-twin predictions? A. Because every prediction has identical accuracy. B. Because decision-makers need to distinguish precise estimates from highly uncertain estimates. C. Because uncertainty makes physical models unnecessary. D. Because it guarantees cybersecurity. Correct Answer: B. Because decision-makers need to distinguish precise estimates from highly uncertain estimates.
|