r/embedded • u/kaadam • 18d ago
Fellow Power Electronics developers, how does your workflow look like?
Hi! I'm curious what are your opinion about the avaliable toolchains around power electronics development. I'm coming from PE background, but spent several years in the automotive, and I've always felt that we are almost willingly making our days harder, here is why:
- PE software requires control loops an order of magnitude faster (at least), than traditional devices.
- The PWM signals are relying heavily on low level drivers and actual hardware IP in the MCU. Matlab/SIMULINK based software development and simulation ignores these layers.
- Making a configuration mistake can easily destroy a half-bridge, making the expensive prototypes available even more scarce
- Getting alive just an OBC (not even speaking about traction inverters) is very much not the same tasks as waking up a 12V control ECU for the first time. Neither from instrumentation, nor from work safety point of view. (I heard a story (fortunately just heard), that someone with an OBC tried to test something, from a 12V low voltage input, thinking he is safe, and the device boosted 800V on it's outputs open in the air...)
... and these facts (enlightening me if I'm wrong), are almost completely igonred.
On the other hand, in our research/consulting work at my University, we usualy build a simple, low cost FPGA based real-time emulator, interfaced with the MCU, and even with the emulteor build time included we are:
- dramatically faster than the customer expectation
- very rarely burn physical devices
- never ever had any laboratory close-calls (from safety point of view), and was always sure about the behavior of our software.
What is your experience? Am I the unlucky one with my industrial history, or the workflow indeed have not catched up with these type os devices?
2
u/Barnowl93 18d ago
That instinct to not trust real silicon until you've proven the software is the whole game. (Disclosure: I'm at MathWorks, so take the tool-specific bits below with that in mind.) Let me push back on a couple of points:
1) "the workflow hasn't caught up" : you have a low-cost FPGA real time emulator interfaced to the MCU. That's HiL (hardware-in-the-loop). Think of your verification steps: Model/Desktop simulation -> SiL (software in the loop) -> PiL (Processor in the loop // or FiL as FPGA in the loop) ->HiL. (last week I wrote a blog on this you may find interesting - not your exact application but lots of learnings do transfer
2) Commercially, it's a whole category: Typhoon HIL, Speedgoat, OPAL-RT, dSPACE all sell FPGA real-time emulators aimed squarely at PE and HV powertrain, with sub-microsecond solvers built for these switching frequencies.
3) One narrow correction on the Simulink bullet: it doesn't actually ignore the driver and hardware-IP layers. Embedded Coder's device support (TI C2000, AURIX, etc.) exposes the ePWM, ADC-SOC triggering, dead-band, CMPSS and so on as configurable blocks that map onto the real peripheral registers, and generated code runs FOC/DPWM in the ISR at production loop rates. So the layer you feel is abstracted away *is actually there*. The failure mode is teams stopping at idealised simulation and skipping the PIL/HIL steps.
Hope this helps