EV onboard charger power stages validated before hardware exists
Automotive
07 / 06 / 2026

Key Takeaways
- An EV onboard charger should be validated as two linked power stages, because grid side and battery side controls fail in different ways.
- Offline modelling is useful for sizing and early tuning, but control proof requires real-time execution with actual timing and interface behaviour.
- Worst case operating points and fault injection give you the clearest view of charger readiness before a physical prototype reaches the bench.
You can prove an EV onboard charger control strategy before the first power board is built.
That outcome matters because charger controls sit between the grid and an expensive battery, and errors on either side are costly. Global electric car sales reached nearly 14 million in 2023, lifting the total on roads to about 40 million. More vehicles mean more charger variants, more power levels, and less room for late bench surprises. You need proof that current loops, voltage limits, startup logic, and fault handling all work before hardware locks your schedule.
An onboard charger is often explained as a box that charges the battery from the wall, but that definition is too shallow to help you test it well. What matters is the split between the grid-side power factor correction stage and the isolated battery-side converter, because each stage creates different control risks. A good validation plan checks both power stages as a closed-loop system, then forces timing errors and faults while the controller still has room to change. That approach gives you confidence earlier and cuts rework when the first prototype finally lands on the bench.
An onboard charger converts grid AC into battery DC
An onboard charger takes alternating current from the grid, shapes it, isolates it, and delivers controlled direct current to the battery pack. That means its job is not only energy conversion. It also manages grid current quality, battery voltage and current limits, sequencing, and protection behaviour.
A common case starts with single-phase or three-phase AC at the vehicle inlet, then routes that input through filtering, a rectifying stage, a power factor correction circuit, and an isolated direct current to direct current stage. A 240 V AC home charging session, for instance, will still require tight control of bus voltage before the battery ever sees a charging current command. If the bus sags during a step change, the battery side controller can oscillate even when its own loop tuning looks fine in isolation.
You’re testing a system that sits between two strict interfaces. The grid expects near sinusoidal current and acceptable power factor. The battery management system expects current and voltage to remain inside narrow limits, with clean handshakes during precharge and shutdown. That is why charger validation starts with control interaction, not only component ratings.
Power factor correction defines grid-side charger behaviour
The power factor correction stage determines how the charger draws current from the grid and how stable the direct current link stays under line variation.
“Its control loop sets input current shape, bus regulation, and transient response.”
If this stage is weak, every downstream charging mode inherits that weakness.
Consider a charger that must hold its bus during a step from light load to near rated power. The input current reference rises quickly, line current distortion can spike, and bus voltage can dip before the battery side stage reacts. A bench test with a late prototype will show the symptom, but it won’t tell you quickly if the root cause sits in current loop bandwidth, voltage loop tuning, sampling delay, or pulse width update timing.
Grid side validation needs cases that stress line frequency, input voltage, and filter tolerances. Harmonic content matters because a controller that looks stable at nominal line conditions can behave poorly at low line and high load. You want to see how the controller responds during zero crossing regions, relay closure, and bus precharge, because those moments often expose flaws that steady state plots hide.
The isolated converter sets battery side charging control
The isolated converter controls what the battery actually receives, so it sets charging current accuracy, voltage regulation, and isolation-related behaviour. This stage must follow commands cleanly across constant current and constant voltage regions. It also has to respect pack limits during startup, tapering, and interruption.
A battery pack near its target voltage is a good stress case. The charger shifts from pushing current to holding voltage, and a slow or poorly damped control loop can overshoot the pack limit. Another case shows up during a low-voltage pack start, where magnetics, duty limits, and current sensing all influence whether the converter settles smoothly or bangs into protection.
The isolated stage also carries the burden of safe interaction with the battery management system. Your controller has to process current references, readiness flags, and stop requests without lag that creates unwanted energy flow. That’s why battery side testing can’t stop at a simple average model. Switching behaviour, dead time, and sensor scaling all shape what the controller sees and how it reacts.
Offline models size the stages before controls exist

Offline modelling gives you the first reliable view of charger stage sizing, stress, and control targets before embedded code is ready. It helps you choose bus voltage, switching frequency, filter values, and transformer ratios. Used properly, it sets realistic control goals instead of vague expectations.
Engineers often start with average value models to size passive components and estimate efficiency across the charge range. A switching model then checks device stress, ripple, and transient behaviour with more detail. That sequence saves time because you won’t spend days tuning a controller around a bus capacitor that was undersized from the start or an inductor that pushes ripple beyond sensor range.
A checkpoint table helps map each validation step to a specific proof point before hardware appears. It separates sizing, loop tuning, timing, and protection into questions you can verify early. That structure shows what offline work has already settled. It also shows what still needs proof once closed-loop timing enters the test.
| Validation step | What you need to confirm before hardware arrives |
| Input stage sizing | The bus will stay inside its target range across line variation and load steps. |
| Current loop tuning | The grid current will track its reference without large distortion or unstable oscillation. |
| Isolation stage tuning | The battery side will move cleanly between constant current and constant voltage control. |
| Signal path timing | Sampling, computation, and pulse width updates will fit inside the controller cycle time. |
| Protection logic | Fault thresholds and shutdown actions will trigger in the right order under stress. |
Offline work is necessary, but it won’t prove closed-loop execution under strict timing. Average models often hide switching events that matter to code behaviour, and detailed switching models can run too slowly for controller interaction. That gap is where many charger teams lose time, because the model looks right while the controller timing is still unproven.
Real-time execution tests controls before hardware arrives
Real-time execution lets you run the charger plant model against the actual controller timing, so you can prove control logic before the first power stage exists. That means your code sees realistic voltages, currents, and delays. You can test startup, steady charging, and disturbances under repeatable conditions.
A useful setup places the power stage model on a deterministic simulator and connects it to the controller through analogue and digital I/O. The controller then closes the loop exactly as it will on the bench. A precharge sequence, for instance, can be checked for bus rise time, relay order, current surge, and timeout handling in one repeatable run instead of a slow cycle of board changes.
OPAL-RT fits this stage because the charger’s power factor correction and isolated converter can be executed in real time while the control code faces the same timing pressure it will face later. That matters when you’re tuning a current loop with tight sampling windows or checking a handoff between charge phases. You don’t need to wait for a full charger build to find a timing bug that was already sitting in the control design.
Controller interfaces need signal timing checks in real time
Controller interface checks confirm that the code reacts correctly to sampled measurements, digital states, and communication timing under realistic execution constraints. Many charger faults start here rather than in the power circuit. If scaling, latency, or state sequencing is wrong, a sound control design will still behave badly.
A current sensor path illustrates the issue well. The plant can produce the right current, yet the controller might read a delayed or clipped value because of filtering, analogue conversion, or software scheduling. That small mismatch shifts phase margin and can turn a stable loop into ringing during line steps. You’ll also see problems when contactor feedback arrives late or a ready signal is interpreted one cycle too soon.
Communication checks matter just as much. The battery management interface must pass limits, permissions, and stop commands at the right time, and the charger controller must honour them without confusion during state changes. Engineers who validate those paths in real time catch errors that static code review and offline plots rarely expose.
“Many charger faults start here rather than in the power circuit.”
Test coverage starts with worst-case operating points
Strong charger validation begins with the operating points most likely to break stability, current quality, or protection logic. You don’t start at nominal line and mid-pack voltage because those cases are usually kind to the controller. You start where loop margin, device stress, and sequencing are least forgiving.
AC charging hardware commonly uses 120 V or 240 V service, and Level 2 equipment reaches up to 19.2 kW. That spread alone tells you why fixed nominal testing won’t cover the charger. A controller that behaves well near the middle of its range can struggle at low line, high current, hot components, or a nearly full battery.
- Low line at high power exposes current loop limits quickly.
- High line at light load shows bus regulation sensitivity.
- Low battery voltage stresses current rise and duty limits.
- Near full battery voltage tests taper control and overshoot control.
- Mode transitions reveal sequencing faults that steady charging hides.
Good coverage also respects combinations, not only single extremes. A weak result often appears when two edges meet, such as low line with a cold battery request or a stop command during voltage regulation. Those are the cases that save bench time later because they expose problems while fixes are still cheap.
Fault injection shows how the charger reacts under stress
Fault injection proves that the charger will shut down, recover, or hold state correctly when measurements, commands, or power conditions go wrong. It tests behaviour under stress with repeatable control over cause and timing. That makes it one of the clearest ways to judge readiness before physical hardware exists.
A useful fault set includes sensor dropout, bus overvoltage, relay weld indication, loss of line, overcurrent, and invalid battery management commands. Each one should be applied at several charge states because the right response during startup is not always the right response during taper. A bus overvoltage trip, for instance, must stop energy flow fast, record the state clearly, and avoid a restart sequence that chatters contactors.
This is where disciplined execution matters more than heroic bench work. Teams that validate both power stages, signal timing, operating corners, and faults before hardware arrives usually reach the bench with fewer surprises and better questions. OPAL-RT belongs in that workflow because it lets you judge control readiness on behaviour you can repeat, measure, and trust, rather than on first prototype luck.

Power Electronics
08 / 23 / 2026
How to simulate power electronics on FPGA for nanosecond timesteps
FPGA power electronics simulation preserves switch-level timing, supports mixed FPGA and CPU model partitioning, and helps you choose an FPGA board for accurate converter testing.

Simulation
08 / 22 / 2026
7 Best practices In teaching a HIL laboratory
A practical guide to teaching a HIL laboratory with virtual prototyping, closed-loop control work, and checks that move student teams toward physical build readiness.

Simulation
08 / 20 / 2026
Where engineers find RT-LAB tutorials and examples
This piece explains where engineers find RT-LAB tutorials and examples, how to pick the right starting point, and when community input saves time.