The bench panel trips as soon as PWM is enabled, the gate signals look wrong, or the first powered test damages the half-bridge. Start here: keep the high-energy bus disabled and prove timing, protection, and feedback behavior against an FPGA real-time emulator before connecting the physical power stage. Move through desktop simulation, SiL, PiL or FiL, and HiL; then energize without load and increase stress in controlled steps.
Read the bench symptoms first
Do not begin by tuning the control loop. Separate a timing or interface fault from a power-stage fault before applying hazardous energy.
| Observed symptom | Likely area to check |
|---|---|
| PWM is missing or appears on the wrong output | Pin mapping, timer routing, low-level driver configuration, output polarity, and hardware-IP setup |
| Complementary outputs overlap | Dead-band configuration, output polarity, update timing, and shutdown-state logic |
| Current or voltage samples jump at switching edges |
ADC-SOC trigger placement, conversion timing, scaling, and sample synchronization |
| Controller behaves correctly in an ideal model but fails on the target | Skipped PiL/FiL/HiL testing, execution-time overruns, peripheral behavior, or driver assumptions |
| Power stage trips or fails during first energization | Incorrect PWM state, missing protection path, invalid feedback, or uncontrolled startup sequencing |
| A low-voltage input test produces a hazardous output | Active boost behavior and an unsafe assumption that input voltage bounds every internal or output node |
Probe the PWM pins and protection outputs with the power stage de-energized. Confirm complementary timing, inactive states, startup states, and fault shutdown first. That is the first check because a perfect control algorithm cannot compensate for overlapping switches or a reversed output polarity.
Trace the failure back through the control path
Power-electronics control combines fast software with hardware-timed peripherals. The control loop may run at least an order of magnitude faster than conventional embedded device loops, while PWM edges, feedback sampling, and protection events depend on MCU hardware rather than application code alone.
Follow the signal chain in both directions:
- Control calculation writes a duty or compare value.
- The timer applies that value according to its update mode.
- Dead-band and polarity logic create gate commands.
- The gate driver translates those commands to the power switches.
- Current and voltage measurements return through ADC triggering and scaling.
- Protection hardware overrides PWM when a limit is crossed.
A desktop plant model proves control mathematics but usually simplifies timer boundaries, register update points, ADC latency, driver propagation, saturation, and protection arbitration. Those details decide whether the same controller survives on real silicon.
Model-based development does not inherently omit the hardware layer. Device support can expose functions such as ePWM, ADC-SOC triggering, dead-band generation, and CMPSS configuration for targets including TI C2000 and AURIX. The recurring failure is stopping at idealized simulation instead of validating generated code, target execution, and peripheral configuration together.
Build the verification ladder
Use each test stage to remove a different class of uncertainty:
-
Model/Desktop simulation: validate equations, state transitions, saturation handling, and expected plant response. -
SiL: execute production-intent software in a host simulation and compare its outputs with the model. -
PiL: run the algorithm on the target processor to expose numeric differences, execution-time limits, compiler effects, and scheduling faults. -
FiL: exercise the controller against FPGA-based signals where processor and peripheral interaction must be tested without a live converter. -
HiL: close the loop between the production controller and a real-time plant emulator, including switching events, sensor signals, faults, and operating transitions.
An FPGA real-time emulator is particularly useful when switching behavior requires resolution below the control-loop period. Commercial power-electronics platforms offer sub-microsecond solvers, but a low-cost purpose-built emulator can also provide deterministic plant behavior when its I/O, latency, and model limits match the test objective.
Treat the emulator as test equipment. Record its input ranges, output scaling, latency, fault states, and behavior when the controller drives an invalid combination. Otherwise, a passing test may only prove that two incorrect interfaces agree.
Run the bring-up procedure
-
Freeze the power boundary. De-energize the high-energy bus, discharge stored energy, and prevent an unexpected gate command from reaching the switches. Treat open outputs as hazardous whenever the topology can boost voltage; a low input such as
12 Vdoes not prove that an output cannot rise toward800 Vin a capable converter. - Inspect startup states. Reset the MCU and watch every PWM and enable output. Confirm that reset, boot, debugger attachment, and software initialization hold the driver in the intended inactive state.
- Verify PWM timing. Command minimum, intermediate, and maximum allowed duty values. Measure period, polarity, complementary relationships, dead time, and update boundaries at the pins.
- Verify feedback timing. Inject known emulator signals. Confirm ADC channel assignment, scaling, sign, offset, saturation, and the location of each sample relative to the switching waveform.
- Exercise protection paths. Inject over-limit and invalid-sensor conditions through the emulator. Confirm the hardware trip path, software latch, reported status, and restart rules without relying on the main control loop to react first.
-
Close the loop in
HiL. Run startup, steady operation, command changes, load changes, sensor faults, and shutdown. Capture controller states and emulator signals on one time base. - Energize without load. After the staged tests pass, apply real power under controlled limits and check no-load behavior.
- Scale operating stress. Increase voltage and load in deliberate increments. Repeat the critical waveform and protection checks at each step rather than jumping directly to the intended operating point.
Verify the fix with pass criteria
Define pass criteria before the test. Read permissible dead time, duty limits, ADC timing, gate-driver states, and electrical limits from the MCU reference manual, driver documentation, converter design calculations, and component datasheets.
- No unintended PWM pulse appears during reset, initialization, debugger activity, or shutdown.
- Complementary outputs never enter a prohibited combination in commanded or faulted states.
- ADC samples occur in the intended switching interval and convert to the expected engineering value.
- The target finishes its control work before the next scheduled update; measure execution time on the production build.
- Injected faults drive the defined safe output state and produce the expected diagnostic indication.
-
SiL,PiL/FiL, andHiLproduce traceable results for the same test vectors. - No-load hardware waveforms match the validated timing before load is increased.
Archive waveforms, controller logs, software revision, peripheral configuration, emulator model revision, and test limits. A verbal statement that the inverter “ran” does not prove startup and protection behavior remained correct.
Avoid the recurring workflow traps
Skipping PiL and HiL is the main trap. It pushes target timing, peripheral mapping, and fault-response discovery onto an expensive prototype or a scarce dynamometer.
- Do not treat supplier sample code as validated production behavior. Trace every timer, ADC, trip, polarity, and pin setting to the target documentation.
- Do not hide critical switching behavior behind an opaque binary component. If you cannot inspect its configuration or prove its outputs with tests, replace it or isolate it behind measurable acceptance criteria.
- Do not repeat destructive power-up attempts while changing several settings at once. Reproduce the symptom in the emulator, change one cause, and rerun the same test vector.
- Do not spend dyno time finding basic PWM or ADC faults. Use dyno access for physical effects the emulator cannot represent adequately.
- Do not infer electrical safety from the applied input alone. Converter topology, startup state, stored energy, and open-circuit boost behavior determine the accessible voltage.
Changing loop gains, swapping power devices, or lowering the command wastes time when the pins already show invalid PWM. Fix the earliest incorrect point in the control path.
FAQ
Why does my inverter work in simulation but fail on the MCU?
The model may omit timer update rules, dead-band polarity, ADC synchronization, execution-time limits, and hardware protection behavior. Run the production controller through PiL or FiL, then close the loop with HiL before powering the converter.
Why does the half-bridge fail as soon as PWM starts?
Start by measuring complementary outputs with the high-energy bus disabled. Check reset states, polarity, dead time, timer update boundaries, and the hardware trip path before changing control-loop gains.
When should I stop power-electronics bring-up and escalate?
Stop when PWM or protection behavior contradicts the MCU, gate-driver, or power-stage documentation, or when you cannot reproduce a safe inactive state without applying hazardous energy. Preserve waveforms, logs, software and configuration revisions, then escalate to the relevant manufacturer's official support channel before another powered test.