Engineering Physics

Chapter 14
Computational Physics, AI and Responsible Engineering Innovation

Bachelors Program in Electrical Engineering
Engineering Physics   •   Bachelor

Computational Physics, AI and Responsible Engineering Innovation

Introduction

Electrical engineers increasingly design systems that cannot be understood adequately by hand calculation alone. Power converters, wireless networks, sensors, batteries, photonic devices, autonomous machines, and quantum hardware are governed by coupled physical laws, uncertain measurements, nonlinear behavior, and large data sets. Computational physics provides numerical methods for approximating physical behavior; artificial intelligence (AI) extracts patterns and supports prediction, control, and design; responsible engineering ensures that these capabilities remain valid, secure, explainable, sustainable, and socially acceptable.

A computational result is not automatically a physical truth. It is the output of a model, numerical method, data pipeline, and implementation. Engineering judgment is required to determine whether the result is credible and whether acting on it is safe. This chapter develops that complete perspective, from differential-equation modeling and simulation to digital twins, machine learning, uncertainty analysis, governance, and emerging technologies.

Learning Objectives

By the end of this chapter, students should be able to:

  1. Formulate physical engineering problems as mathematical and computational models.
  2. Explain discretization, numerical error, stability, convergence, and validation.
  3. Design a basic data-acquisition and uncertainty-analysis workflow.
  4. Distinguish simulation models, surrogate models, digital twins, and machine-learning models.
  5. Evaluate machine-learning performance for physical systems without confusing correlation with causation.
  6. Assess cybersecurity, standards, lifecycle cost, sustainability, ethics, and governance.
  7. Identify opportunities and limitations in quantum, photonic, and energy technologies.

1. From Physical Law to Computational Model

A model is a purposeful representation of a system. A useful engineering model specifies:

  • State variables, such as temperature, voltage, current, displacement, or magnetic flux.
  • Inputs, such as applied voltage, load, irradiance, or ambient temperature.
  • Parameters, such as resistance, inductance, thermal conductivity, or material density.
  • Outputs, which are measured or decision-relevant quantities.
  • Boundary and initial conditions, which make the problem mathematically determined.
  • Validity domain, including operating range, time scale, geometry, and environmental assumptions.

For example, an ideal series RLC circuit can be modeled by Kirchhoff’s voltage law:

L \frac{d2q}{dt2} + R\frac{dq}{dt} + \frac{q}{C} = vs(t)

Here, q is charge in coulombs, t is time in seconds, L is inductance in henries, R is resistance in ohms, C is capacitance in farads, and v_s is source voltage in volts. The current is i = dq/dt. The model assumes lumped components, linear time-invariant parameters, negligible radiation, and no saturation or parasitic effects. It is useful when the physical dimensions are small relative to the electromagnetic wavelength and the operating range does not make the components strongly nonlinear.

A computational model may be obtained by discretizing a continuous equation. Using a forward finite difference for the first derivative gives:

\frac{dx}{dt}\bigg|tk \approx \frac{xk+1-xk}{\Delta t}

where Δt is the time step. The approximation has truncation error that decreases as Δt decreases, but smaller steps increase computational cost. A numerical solution must therefore balance accuracy, stability, and efficiency.

Verification, Validation, and Calibration

These three activities answer different questions:

ActivityMain questionTypical evidence
VerificationWas the model implemented correctly?Code review, conservation checks, analytical test cases
ValidationDoes the model represent the real system adequately?Comparison with independent experiments
CalibrationWere uncertain parameters estimated appropriately?Parameter fitting using training or calibration data

A model can be correctly programmed but physically inadequate. Conversely, a model may fit existing data while failing outside the calibration range. Validation data should therefore be independent of data used to tune parameters whenever possible.

2. Numerical Methods and Simulation Quality

Common computational approaches include:

  • Finite difference methods, which approximate derivatives on a grid.
  • Finite element methods, which divide a domain into elements and approximate the solution using basis functions. They are widely used for electromagnetic, thermal, structural, and semiconductor problems.
  • Finite volume methods, which enforce conservation over control volumes and are common in fluid and thermal transport.
  • Ordinary differential-equation solvers, used for circuits, control systems, and dynamic models.
  • Monte Carlo methods, which use repeated random sampling to estimate probabilities, expectations, or uncertainty.
  • Optimization methods, which select design variables subject to objectives and constraints.

Three numerical properties are especially important:

  1. Consistency: the discrete equations approach the continuous equations as grid spacing and time step approach zero.
  2. Stability: numerical errors do not grow without bound during computation.
  3. Convergence: the numerical solution approaches the exact solution as discretization is refined.

For linear problems, stability is often associated with the eigenvalues of the update matrix. For nonlinear and multiphysics problems, stability may depend on operating point, solver tolerances, coupling strategy, and boundary conditions. A convergence plot or mesh-refinement study is stronger evidence than simply reporting many decimal places.

Worked Example: Explicit Thermal Simulation

Consider a lumped thermal body with heat capacity C_th = 1000 J/K, thermal resistance R_th = 0.20 K/W, ambient temperature T_a = 25 °C, and constant input power P = 100 W. The energy balance is:

Cth\frac{dT}{dt}=P-\frac{T-Ta}{Rth}

The thermal time constant is:

\tau=RthCth=0.20\times1000=200\ \text{s}

At steady state, dT/dt = 0, so:

Tss=Ta+PRth=25+(100)(0.20)=45\ ^\circ\text{C}

Using a forward-Euler step of Δt = 20 s from T_0 = 25 °C:

Tk+1=Tk+\frac{\Delta t}{Cth}\left[P-\frac{Tk-Ta}{Rth}\right]

For the first step, the heat-loss term is zero, and therefore T_1 = 25 + (20/1000)(100) = 27 °C. The result is physically plausible and moves toward 45 °C. However, the step size must be selected with regard to stability and accuracy; a simulation that overshoots or oscillates for a first-order passive thermal system may indicate an unsuitable step size or implementation error.

3. Measurement, Data Acquisition, and Uncertainty

A data-acquisition system normally contains a sensor, signal conditioning, sampling circuit, analog-to-digital converter, time base, storage, and processing software. Errors can arise from sensor bias, noise, quantization, aliasing, drift, calibration error, electromagnetic interference, and incorrect timing.

The sampling frequency f_s should be sufficiently high relative to the highest relevant signal frequency f_max. For a band-limited signal, the Nyquist condition requires:

fs>2fmax

In practice, an anti-aliasing filter and engineering margin are required. Sampling above the theoretical minimum does not correct a poorly designed sensor or an unfiltered high-frequency signal.

For independent input quantities x_i and a measured output y = f(x_1, x_2, …, x_n), first-order uncertainty propagation is:

uy2\approx\sumi=1n\left(\frac{\partial f}{\partial xi}\right)2uxi2

where u_xi is the standard uncertainty of x_i. This expression assumes small uncertainties, local linearity, and negligible covariance. If inputs are correlated, covariance terms must be included:

uy2\approx\sumi\sumj\frac{\partial f}{\partial xi}\frac{\partial f}{\partial xj}\operatorname{Cov}(xi,xj)

For a mean of N independent observations with standard deviation s, the standard uncertainty of the mean is:

u_{\bar{x}}=\frac{s}{\sqrt{N}}

This reduction applies to random variation, not systematic bias. Repeating a measurement cannot remove an incorrectly calibrated instrument.

A responsible analytics report should state the data source, sampling conditions, calibration status, preprocessing, missing-data treatment, uncertainty, and confidence or coverage convention. Precision must not be confused with accuracy.

4. Digital Twins and Physics-Informed AI

A digital twin is a computational representation connected to a particular physical asset or process through a continuing data exchange. A static simulation model may represent a class of devices, whereas a digital twin is updated using the condition and operating history of an individual asset. A practical twin commonly includes:

  1. A physical asset and sensors.
  2. Communication and data management.
  3. A physics-based, statistical, or hybrid model.
  4. State estimation and parameter updating.
  5. Decision, visualization, or control functions.

A twin is not merely a three-dimensional visualization. Its credibility depends on sensor quality, synchronization, model validity, cybersecurity, and the consequences of incorrect decisions.

Machine learning (ML) models learn a mapping from inputs to outputs. In supervised regression, a model f_θ is fitted by minimizing a loss such as mean squared error:

\operatorname{MSE}=\frac{1}{N}\sumi=1N(yi-\hat{y}i)2

where y_i is an observed value, ŷ_i is the prediction, and N is the number of observations. MSE has squared output units and is sensitive to large errors. Mean absolute error is:

\operatorname{MAE}=\frac{1}{N}\sumi=1N|yi-\hat{y}i|

and has the same units as the output.

A dataset must be divided carefully into training, validation, and test data. For time-dependent systems, random shuffling can cause leakage: future information may enter the training set. Chronological splits are usually more defensible. Performance should be evaluated over operating regimes, fault modes, temperatures, and loads relevant to deployment.

Physics-informed approaches constrain learning using conservation laws or governing equations. A loss may combine data error and physics residual:

\mathcal{L}=\mathcal{L}data+\lambda\mathcal{L}physics

where λ weights the physical constraint. This is not a universal guarantee of correctness. Incorrect equations, poor scaling, inadequate boundary conditions, or biased data can still produce unreliable results.

5. Model Risk, Explainability, and Decision Quality

Important failure modes include overfitting, underfitting, distribution shift, unrepresentative data, sensor spoofing, hidden confounding, and extrapolation beyond the training domain. A low average error may conceal dangerous rare failures. Engineering evaluation should therefore include:

  • Error distributions, not only a single score.
  • Worst-case and high-consequence scenarios.
  • Calibration of predictive intervals.
  • Sensitivity to inputs and missing data.
  • Independent test data and reproducible software versions.
  • Human review for safety-critical decisions.

Explainability has several meanings. A feature-importance plot may describe statistical association, but it does not prove physical causation. A physically interpretable reduced-order model may be more valuable than a slightly more accurate black-box model when certification, maintenance, or safety is important.

6. Cybersecurity, Standards, and Governance

Computational engineering systems have an attack surface including sensors, firmware, networks, cloud services, model files, application programming interfaces, and user accounts. Threats include false-data injection, denial of service, ransomware, model poisoning, adversarial inputs, unauthorized model changes, and theft of proprietary design data.

A defense-in-depth strategy includes secure boot, authenticated updates, least-privilege access, network segmentation, encryption, logging, backups, vulnerability management, time synchronization, and incident-response procedures. Safety and cybersecurity should be considered together: a malicious command and a software defect can produce the same physical hazard.

Standards and regulations depend on application and jurisdiction. Engineers should identify applicable requirements for functional safety, electromagnetic compatibility, information security, data protection, electrical installation, environmental impact, and quality management. Standards do not replace engineering judgment; compliance is a baseline, not proof that a system is safe in every context.

Governance should assign responsibility for data ownership, model approval, change control, monitoring, auditability, human override, and retirement. A model card or technical dossier should document intended use, limitations, training data, evaluation conditions, known failure modes, and version history.

7. Lifecycle Cost and Sustainability

The cheapest initial design is not necessarily the least expensive over its life. A simple present-value model for a project with initial cost C_0 and future costs C_t is:

LCC=C0+\sumt=1n\frac{Ct}{(1+r)t}-\frac{Sn}{(1+r)n}

where LCC is lifecycle cost, n is the analysis period, r is the discount rate per period, C_t is cost in period t, and S_n is residual or salvage value at the end. The formula assumes costs can be represented financially and that the chosen discount rate is appropriate. Energy, maintenance, downtime, software support, disposal, and environmental compliance should be included where material.

Sustainable computational engineering considers embodied materials, operational energy, cooling, data movement, hardware replacement, repairability, and end-of-life recovery. AI can reduce energy waste through prediction and control, but large-scale computation also consumes energy and water. A credible sustainability claim states the system boundary, functional unit, time horizon, and trade-offs.

8. Responsible Innovation and Professional Ethics

Responsible innovation asks not only whether something can be built, but whether it should be built, for whom, under what safeguards, and with what consequences. Core principles include safety, human welfare, fairness, privacy, transparency, accountability, inclusiveness, and environmental stewardship.

Engineers have a duty to communicate uncertainty and foreseeable misuse. Automation bias can cause operators to accept an incorrect prediction because it appears objective. Conversely, excessive distrust may prevent beneficial deployment. Appropriate human oversight depends on consequence, reversibility, response time, and model reliability.

Ethical analysis should identify affected stakeholders, benefits, burdens, vulnerable groups, unintended uses, and mechanisms for appeal or correction. In safety-critical systems, professional responsibility cannot be transferred to an algorithm vendor or an opaque model.

9. Emerging Technologies

Quantum Engineering

Quantum sensors exploit effects such as superposition, interference, and entanglement to measure selected quantities with potentially exceptional sensitivity. Quantum computers use qubits and quantum gates, but practical advantage depends on error correction, problem structure, hardware scale, and total system cost. Engineers should distinguish laboratory demonstrations from deployable capability.

Photonic Technologies

Photonic integrated circuits manipulate light for communication, sensing, and computation. They can provide high bandwidth and low latency, but challenges include optical losses, thermal control, packaging, conversion between optical and electrical signals, and manufacturing tolerances. Photonics is especially relevant to data centers, fiber communications, lidar, and precision sensing.

Energy Technologies

Battery systems, wide-bandgap semiconductors, power electronics, grid-forming inverters, hydrogen systems, and carbon-aware control are reshaping electrical engineering. Wide-bandgap devices such as silicon carbide and gallium nitride can support high switching frequency and efficiency, but require careful gate driving, insulation, electromagnetic compatibility, thermal management, and reliability analysis.

Emerging technology assessment should examine technical readiness, supply chains, critical materials, safety, interoperability, lifecycle impact, workforce capability, and total cost rather than focusing only on peak laboratory performance.

Applied Case: Illustrative Digital Twin for a Solar Inverter

Background

A utility-scale photovoltaic plant uses grid-connected inverters. Excessive junction temperature accelerates degradation, while unexpected trips reduce energy production.

Problem

The operator has temperature, current, voltage, ambient-condition, and alarm data, but wants early warning of thermal stress without creating unacceptable false alarms.

Analysis

Engineers first construct a reduced thermal model using power loss, heat capacity, and thermal resistance. Sensor calibration and timestamps are checked. Historical data are divided chronologically: early operation for calibration, a later period for validation, and the most recent period for testing. Known maintenance events are labelled separately to avoid confusing repairs with ordinary behavior.

An ML residual model predicts the difference between measured temperature and the physics-based estimate. Performance is reported using MAE, false-alarm rate, missed-event rate, and uncertainty intervals. Testing includes hot ambient conditions, rapid irradiance changes, sensor dropout, and communication delay.

Approach and Solution

The deployed twin combines the thermal model, sensor-quality checks, a residual detector, and a rule that requires persistent evidence before issuing a maintenance alert. Operators can inspect the contributing measurements and override the recommendation. Network segmentation and signed software updates protect the monitoring system. Model changes require documented approval and rollback capability.

Outcome

In this illustrative scenario, the twin identifies abnormal thermal behavior earlier than a fixed temperature threshold while avoiding alerts caused by a known faulty sensor. The result is not guaranteed by the algorithm alone; it depends on validated sensors, representative data, monitoring after deployment, and disciplined maintenance procedures.

Learning Points

The case demonstrates that a digital twin is a sociotechnical system. Physics improves plausibility, ML can capture residual patterns, uncertainty supports cautious decisions, and cybersecurity and governance protect the whole workflow.

Challenges and Best Practices

Major challenges include incomplete physical knowledge, expensive high-quality data, changing operating conditions, computational cost, legacy-system integration, software obsolescence, and unclear accountability. Best practice is to:

  1. Define the decision and consequence before selecting an algorithm.
  2. Start with the simplest model that meets accuracy requirements.
  3. Check units, conservation laws, bounds, and limiting cases.
  4. Separate verification, calibration, validation, and testing.
  5. Quantify uncertainty and test rare but hazardous conditions.
  6. Prevent data leakage and document dataset provenance.
  7. Monitor drift, cybersecurity events, and post-deployment performance.
  8. Use lifecycle cost and environmental boundaries explicitly.
  9. Provide human oversight proportional to risk.
  10. Retire or retrain models when their validity domain changes.

Chapter Summary

Computational physics converts physical laws into numerical models, but discretization introduces error and requires verification, convergence testing, and validation against independent evidence. Data acquisition must address sampling, calibration, noise, aliasing, and uncertainty. Digital twins connect computational representations to individual physical assets, while machine learning can support prediction and control when data are representative and leakage is prevented. Hybrid physics-informed models can improve plausibility but do not eliminate model risk.

Responsible engineering extends beyond accuracy. Cybersecurity, standards, lifecycle cost, sustainability, ethics, governance, explainability, and human accountability determine whether innovation is trustworthy. Quantum, photonic, and energy technologies offer important opportunities, but should be assessed through readiness, safety, supply chains, environmental impact, and total lifecycle value. The central professional principle is to make computational decisions traceable, uncertainty-aware, physically defensible, and appropriate to their consequences.

Key Terms

Model: A purposeful representation of a physical or engineered system.

Discretization: Replacement of continuous equations by algebraic or finite computational forms.

Verification: Demonstration that a computational model was implemented correctly.

Validation: Assessment of whether a model represents the real system adequately for its intended use.

Calibration: Estimation of model parameters from observations.

Stability: Numerical property in which errors remain bounded under the computational procedure.

Convergence: Tendency of a numerical solution toward the exact or reference solution as resolution increases.

Digital twin: A computational representation linked to a particular physical asset through continuing data exchange.

Machine learning: Methods that infer patterns or mappings from data.

Data leakage: Use of information in model development that would not be available at deployment.

Uncertainty: Incomplete knowledge or variation affecting a measured or predicted quantity.

Aliasing: Misrepresentation of high-frequency content caused by inadequate sampling.

Surrogate model: A computationally cheaper approximation of an expensive model.

Physics-informed model: A model that incorporates governing physical relationships into learning or prediction.

Model drift: Degradation caused by changes in data, equipment, environment, or operating conditions.

Defense in depth: Use of multiple independent cybersecurity safeguards.

Lifecycle cost: Total discounted cost over acquisition, operation, maintenance, and disposal.

Responsible innovation: Development that considers safety, ethics, societal effects, and sustainability.

Quantum technology: Technology exploiting controllable quantum phenomena for computation, sensing, or communication.

Photonic integration: Integration of optical functions on a compact semiconductor or optical platform.

Review Questions

Short Answer Questions

  1. Distinguish verification, validation, and calibration.
  2. Why can repeated measurements reduce random uncertainty but not systematic bias?
  3. What is data leakage, and why is it especially serious for time-dependent systems?
  4. State two cybersecurity threats to a digital twin.
  5. Why should lifecycle cost include maintenance and disposal?

Long Answer Questions

  1. Explain the pathway from a physical law to a validated numerical simulation, including assumptions, discretization, stability, convergence, and validation.
  2. Describe the architecture of a digital twin for an electrical-energy asset and explain the role of sensors, models, communications, and governance.
  3. Compare physics-based, data-driven, and hybrid models for safety-relevant engineering decisions.
  4. Discuss how uncertainty, explainability, and human oversight affect responsible deployment of AI in engineering.
  5. Evaluate the opportunities and limitations of quantum, photonic, and wide-bandgap energy technologies.

Analytical / Application Questions

  1. A thermal model predicts 60 °C while the measured value is 64 °C, with a stated measurement standard uncertainty of 2 °C. Explain what additional information is needed before deciding that the model has failed.
  2. Design a validation and cybersecurity plan for an ML system that predicts transformer faults from sensor data. Include data splitting, performance metrics, drift monitoring, and operator intervention.
  3. A proposed inverter upgrade costs more initially but reduces energy loss and maintenance. Formulate a lifecycle-cost comparison and identify technical, environmental, and ethical factors that should accompany the financial result.

Multiple Choice Questions with Answers

Question 1

Which activity determines whether a computational model represents a real system adequately for its intended use?

A. Verification

B. Validation

C. Compilation

D. Discretization

Correct Answer: B. Validation

Question 2

For a band-limited signal with highest relevant frequency f_max, the theoretical minimum sampling condition is:

A. f_s < f_max

B. f_s = f_max/2

C. f_s > 2f_max

D. f_s > f_max/2

Correct Answer: C. f_s > 2f_max

Question 3

In the thermal example, the steady-state temperature was:

A. 25 °C

B. 27 °C

C. 40 °C

D. 45 °C

Correct Answer: D. 45 °C

Question 4

Which error is not removed simply by repeating measurements?

A. Random noise

B. Sampling variation

C. Systematic calibration bias

D. Variation in the sample mean

Correct Answer: C. Systematic calibration bias

Question 5

Why is a chronological data split generally preferable for a time-dependent engineering system?

A. It guarantees zero prediction error

B. It avoids using future information to predict the past

C. It eliminates sensor noise

D. It makes the model physically exact

Correct Answer: B. It avoids using future information to predict the past

Question 6

A digital twin differs from a static simulation primarily because it:

A. Never uses physical equations

B. Is connected to data from a particular physical asset

C. Can only display three-dimensional graphics

D. Requires no validation

Correct Answer: B. Is connected to data from a particular physical asset

Question 7

The mean absolute error has:

A. Squared output units

B. The same units as the predicted output

C. Units of time only

D. No units in any application

Correct Answer: B. The same units as the predicted output

Question 8

Which measure is an example of defense in depth?

A. Using one shared password for all devices

B. Disabling software updates

C. Combining network segmentation, authentication, logging, and backups

D. Removing all human oversight

Correct Answer: C. Combining network segmentation, authentication, logging, and backups

Question 9

In lifecycle-cost analysis, future cost C_t is discounted using:

A. C_t(1+r)^t

B. C_t/(1+r)^t

C. C_t+r+t

D. C_t/t-r

Correct Answer: B. C_t/(1+r)^t

Question 10

A physics-informed loss commonly combines:

A. Only hardware cost and labor cost

B. Data error and a physics residual

C. Voltage and current without units

D. Training accuracy and network speed only

Correct Answer: B. Data error and a physics residual

Engineering Physics
Chapter 14 of 14