Interactive Monograph · Scientific ML for Automotive

Physics-Informed Networks on the vehicle

A companion to the first monograph, now under the hood. The same idea, a network taught by data and by governing equations at once, applied to the three subsystems that decide an electric drivetrain's range, reliability, and torque: the battery, the inverter, and the motor.

01 / The case

Why a vehicle needs physics priors

A car is instrumented sparsely on purpose. Every sensor is cost, weight, and another thing that can fail, so the quantities engineers most want, the charge left in a pack, the temperature inside a power module, the flux in a rotor, are usually not measured directly. They are inferred from a few cheap signals and a model of how the part behaves.

That is already the logic of a state observer, the Kalman filters and Luenberger observers that run in every modern controller. A Physics-Informed Neural Network is a close cousin: instead of hand-deriving an observer, you let a network learn the mapping while a governing equation keeps it honest. The payoff for automotive work is specific:

The three sections that follow each take a real drivetrain subsystem, state its governing equation, simulate it live, and show where a PINN attaches. The simulations below are genuine numerical integrations of those equations, running in your browser.

02 / The shared recipe

One pattern, three subsystems

Every example uses the same skeleton from the first monograph. A network takes the operating variables and predicts a state. That prediction is graded two ways: against whatever was measured, and against the subsystem's differential equation, evaluated by automatic differentiation at many points. The only thing that changes from battery to inverter to motor is which equation goes in the physics box.

inputs time, current, speed, load network predicts the hidden state Data loss match the few measured signals (terminal voltage, NTC temp, phase current) Physics loss autodiff the state, plug into the subsystem equation, residual should be 0 battery ODE · thermal network · dq equations
The common skeleton. Swap the equation in the teal box and the same training loop serves a battery, an inverter, or a motor. The residual that the physics loss drives toward zero doubles, after training, as a fault detector when real hardware no longer matches the equation.
New to the idea of a residual or a collocation point? The first monograph builds them up from scratch with a spring-mass example and a live trainer.
03 / Battery

Equivalent circuit and state of charge

A lithium cell is modeled as a controlled voltage source behind a small network of resistors and capacitors. The source is the open-circuit voltage, a known function of how full the cell is. A series resistor R₀ captures the instant voltage drop under load, and a resistor-capacitor pair, R₁ with C₁, captures the slower polarization that makes voltage sag and recover. This is the Thevenin equivalent-circuit model that runs in most battery management systems.

OCV(SoC) R₀ R₁ C₁ + terminal – terminal I (load) V = OCV(SoC) – I·R₀ – V₁ dV₁/dt = –V₁/(R₁C₁) + I/C₁ dSoC/dt = –I/(3600·Q)
The equivalent-circuit model. Three coupled relations: an algebraic one for terminal voltage and two differential ones for the polarization voltage V₁ and the state of charge. The unknown that a battery management system most wants, SoC, never appears at a terminal. It must be estimated.

Simulate a discharge

Run a load profile through the cell. The amplitude slider scales the current draw; the other two age the cell, R₀ rises and capacity Q fades as a battery wears. Watch the terminal voltage sag harder and the usable charge shrink.

14 A peak 0.050 Ω 2.50 Ah
terminal voltage fresh-cell reference load current
Live equivalent-circuit simulation. Forward-integrated from the three relations above. A worn cell (higher R₀, lower Q) drops more voltage under the same load and reaches empty sooner, the visible signature of capacity and power fade.

Where the PINN attaches, and state of health

For state estimation, the network takes time and the measured current and predicts SoC and V₁. The data loss matches the one signal you actually have, terminal voltage; the physics loss enforces the two differential relations at many instants. The network learns to back out charge from voltage exactly as an observer would, with the circuit equations as the law.

Turn it around for diagnostics. If R₀ is unknown, make it trainable and recover it from operating data. A rising R₀ is a direct state-of-health marker. Press estimate to fit R₀ to the noisy voltage above; the aging gauge reads the deviation from a fresh cell.

recovered R₀ = fresh cell ≈ 0.050 ΩHEALTHY
state-of-health indicator (internal resistance growth)
Resistance as a health signal. The same physics that estimates charge also estimates the parameters, and a parameter that has drifted is a part that has aged. This is parameter-identification prognostics: no teardown, just the trajectory.
04 / Inverter

IGBT losses and junction heat

The inverter switches the DC bus into three-phase current, and every switching event and every amp of conduction dumps heat into the power module. The silicon junction is the hottest, most fragile point in the drivetrain, and it is never measured directly, only a slower case or coolant sensor is. Junction temperature must be estimated, and it is what limits how hard the inverter can be pushed.

Two physics blocks describe it. A loss model turns current and switching frequency into power dissipated, and a thermal network, a ladder of thermal resistances and capacitances, turns that power into a temperature rise over time.

inverter leg I, fₛₙ, duty loss model P = Vₘₑ·I·D + R·I²·D + Eₛₙ·fₛₙ P(t) R₁ R₂ R₃ R₄ Cₙ coolant / heatsink (ambient) Tj
Loss model plus Foster network. Power flows in at the junction node Tj and leaks to the coolant through four resistor-capacitor stages, each a different time constant. The fast stages set the temperature spike during a switching burst; the slow ones set the steady climb. The governing relation per stage is the same first-order law the spring obeyed.

Simulate the junction temperature

Drive a repeating load, like bursts of hard acceleration. The junction heats and cools, the swing being the thermal cycling that fatigues solder and bond wires. The cooling slider degrades the heat path, as a dried-out thermal interface would, and the limit line marks where the controller must derate.

200 A 10 kHz 0 % degraded
peak Tj = cycling ΔTj = OK
junction temperature headroom to the 150 °C limit
junction Tj power loss 150°C limit
Live thermal simulation. Integrated from the Foster network with the loss model as its forcing. Raising current or switching frequency lifts the loss; degrading the cooling lifts the whole curve toward the limit. The peak and the cycling amplitude together drive lifetime, which is why both are tracked.

Where the PINN attaches

The network maps time and load to junction temperature, with the data loss tied to the slow case sensor you can afford and the physics loss enforcing the thermal network. It becomes a soft sensor for the temperature you cannot measure. Make the thermal resistance trainable and a rising value reveals a degrading heat path before the junction ever overheats, the prognostic version of the same model.

soft-sensing Tjthermal-path Rₜₕ trackingcycling → fatigue lifeactive derating
05 / Motor

The PMSM dq model and field-oriented control

The traction motor is governed cleanest in the rotating dq frame, where the three phase currents become two: id aligned with the rotor magnet and iq in quadrature, the one that makes torque. In that frame the electrical dynamics are two coupled first-order equations, and the torque is an algebraic combination of the currents.

vd = Rₛ id + Ld did/dt – ωₑ Lq iq
vq = Rₛ iq + Lq diq/dt + ωₑ(Ld id + ψₘₐ)

Te = 3/2 p [ ψₘₐ iq + (Ld – Lq) id iq ]
red terms = speed cross-coupling · ψₘₐ = magnet flux · (Ld–Lq) = saliency

Two features make this rich. The red cross-coupling terms mean the d and q axes disturb each other more violently the faster the motor spins, so a controller must actively cancel them. And the saliency term, present when Ld and Lq differ, is the extra reluctance torque your axial-flux and interior-magnet machines are designed to exploit.

id*, iq* setpoints PI current loop decoupling + Park / PWM inverter DC bus PMSM dq plant id, iq, Te measured current feedback (Clarke / Park)
The field-oriented control loop. Current setpoints are compared to measurements, a PI controller acts on the error, and a decoupling block cancels the speed cross-coupling before the inverter drives the motor. The simulation below is the PI loop plus the dq plant, integrated step by step.

Simulate a torque step

Command a step in iq and watch the loop respond. With decoupling off, spinning fast, the q-axis step kicks the d-axis current sideways through the cross terms. Switch decoupling on and the disturbance is cancelled, the clean axis separation that field-oriented control exists to deliver.

100 A 3000 rpm 0.070 Wb
steady torque = MAGNET OK
magnet health (flux relative to nominal)
iq (torque) id (flux) iq command
Live FOC current loop. The d-axis trace tells the story: with decoupling off at high speed it bulges away from zero on every q-axis move; with it on, it stays pinned. Lowering the magnet flux ψₘₐ models demagnetization, the same iq then makes less torque.

Where the PINN attaches, and motor health

Feed the network voltages and speed and have it predict the dq currents, with the two electrical equations as the physics. More valuable on a wearing motor: make the parameters trainable. A drifting Rₛ flags a winding or connection fault, changing Ld and Lq reveal magnetic saturation, and a falling ψₘₐ is demagnetization, a partially lost magnet. Estimate the flux from the steady operating point below.

recovered ψₘₐ = nominal = 0.070 Wb
Magnet flux as a health signal. At a known steady point the q-axis voltage balance reads vq = Rₛiq + ωₑ(Ldid + ψₘₐ), so the flux falls straight out of measured voltage, current, and speed. Track it over a motor's life and a sustained drop is a magnet losing strength, often from overheating.
06 / The system

Toward a vehicle digital twin

Each subsystem carried its own equation, but they share one diagnostic principle: train a network to obey the healthy physics, then watch the residual. A residual that stays near zero means the part still behaves lawfully; a residual that creeps up is a part beginning to fail. Run one such monitor per subsystem and feed the residuals to a supervisor and you have the skeleton of a model-based health manager.

Battery PINN Inverter PINN Motor PINN residual → SoC, SoH residual → Tj, cooling residual → Rₛ, ψ health Health manager fuse, threshold, derate alerts, limits
Residuals as a common currency. Heterogeneous subsystems, one diagnostic language. Each PINN reports both an estimated state and how hard its physics is being violated, and the supervisor turns that into charge, temperature, and health readouts plus protective action.

Where this sits next to what you already run

A PINN does not replace the extended Kalman filters, sliding-mode observers, and calibrated lookup tables already in production. It complements them. Where a hand-built observer needs a tractable model and careful tuning, a PINN can absorb messier physics and learn corrections from fleet data, while the equation keeps it from hallucinating. The honest framing is a hybrid model: physics for the part you trust, learning for the part you cannot derive.

07 / Honest limits

What to watch in automotive

Used with these in mind, physics-informed learning is a natural fit for the parts of a vehicle that are hard to sense and expensive to fail: a way to turn the equations engineers already trust into soft sensors and health monitors.

08 / Glossary

The automotive terms

State of charge (SoC)
How full the battery is, as a fraction. Not measurable at a terminal, so it is estimated from voltage, current, and a model.
State of health (SoH)
How aged the part is. For a cell, captured by internal resistance growth and capacity fade.
Open-circuit voltage (OCV)
The cell's resting voltage as a function of charge, the controlled source in the equivalent-circuit model.
Equivalent-circuit model (ECM)
A resistor-capacitor circuit standing in for a cell's electrical behavior. The Thevenin form used here has one RC pair.
Foster network
A ladder of thermal resistances and capacitances representing the heat path from silicon junction to coolant.
Junction temperature (Tj)
The temperature of the semiconductor die, the hottest and most failure-prone point in the inverter.
Field-oriented control (FOC)
Controlling a motor in the rotating dq frame so flux and torque are commanded independently.
dq frame & saliency
The rotor-aligned coordinates; saliency is the Ld ≠ Lq difference that yields extra reluctance torque.
Demagnetization
Permanent loss of rotor magnet strength, seen as a falling flux linkage ψₘₐ and reduced torque per amp.
Residual, collocation point, automatic differentiation, and the loss function are defined in the first monograph, which this page builds on.