Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Fri Sep 12, 2025 8:43 pm
by noquarter
Hello all,
I previously posted about this in the leaf forum but I'm looking for some broader knowledge now.
I'm trying to make a series hybrid system with NO battery. Essentially this will replace a conventional transmission and nothing else.
I would like to use two leaf motors and their inverters with OI boards to accomplish this. My main concern at the moment is powering up the inverter on the generator motor with no battery. I don't know enough about how inverters work or motors (or really more complex electrical concepts at all) to understand how the current flows and what voltage is determined by. There are others working on this project who have better understanding of electrical concepts so please don't hesitate to give me a proper explanation!
I understand that the OI board only needs 12v DC to function (which I can get from the ICE), but do the power electronics in the inverter require a DC voltage coming in to function properly? Do they need to be "excited" or otherwise energized from the DC side?
In simplest terms: can I just spin the shaft of a PMSM with the OI board commanding regen and expect a voltage generated on the DC side?
Additionally, what kind of voltage can I expect? The leaf motor operates at 360v when operating normally. How can I determine the voltage produced at different speeds, and what options do I have in terms of regulating that voltage with the inverter? The ICE motor I'm using will run at 3600RPM, however I need a voltage output down to 1800 RPM which is the idle speed of the motor.
Thank you.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Sep 13, 2025 6:48 am
by arber333
Your idea of hybrid without battery is flawed. People have tried this and.failed. It mostly goes the way of engine not being able to supply power shift when accelerating or anyhow changing the drain side.
I have seen this with hybrid glider aircraft.and electric motorcycle. You simply need a buffer for.energy conversion, either battery or supercaps.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Oct 04, 2025 12:58 pm
by EVGO1987
The basic idea can work, but based on my practice, I must agree with arber333: you need a buffer.
Basically, if you have a PMSM, it will generate voltage as soon as it spins because of your ICE.
This, if you have a good inverter, will be "high enough" to start working, and actively bring it to desired voltage.
But then, a challenge:
At the generator side, your controller must have speed-control AND DC voltage control capabilities.
(Voltage will be held at a requested value, like 350V, with margins for overvoltage etc, so not 398V.)
And I don't know if the controller you are using can so it, but it is not a trivial task for sure.
For example, for free-programmable controllers like Sevcon, you need a special, dedicated generator software.
The drive-end motor is less challenging, just have some smooth ramps and a lower power limit than your generator can do.
I did it before with this vehicle:
... and we had to install some big caps do "dampen" the system.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Fri Jan 16, 2026 4:18 am
by noquarter
Thanks for the reply EVGO1987. I missed the notification.
We're about ready to begin testing, but there may be an issue. Because the ICE spins CW, the leaf motor is going to need to be spun CCW. Is there any additional configuration that needs to be done in the OI board to make regen function as normal? Or does FOC treat it the same regardless of direction of rotation?
Additionally, what parameter determines my DC bus voltage?
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Fri Jan 30, 2026 8:53 pm
by noquarter
Done some testing at this point and we have been able to generate a voltage out of the inverter. But it seems to generate a voltage whether or not the inverter is powered up or not. This seems odd to me as I thought the IGBTs would prevent any power from flowing back when switched off?
With the inverter started and set to produce regen via offthrottleregen being set to -100, I did testing at 1500RPM connected to the ICE and then spun it all the way up to 3600RPM. It produced 70 volts at 1500 RPM and 95 volts at 3600.
I would really like to know what I could change to create a higher voltage as 95 volts isn't going to cut it. I am unsure what parameter regulates regen voltage.
Additionally, is there any way to confirm the HV switching is actually operating and rectifying AC? Since it seems to generate a voltage which the inverter started or not, I'm unsure of how to tell.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Fri Jan 30, 2026 11:33 pm
by 0tik
arber333 wrote: ↑Sat Sep 13, 2025 6:48 am
Your idea of hybrid without battery is flawed. People have tried this and.failed. It mostly goes the way of engine not being able to supply power shift when accelerating or anyhow changing the drain side.
I have seen this with hybrid glider aircraft.and electric motorcycle. You simply need a buffer for.energy conversion, either battery or supercaps.
Aber I have a (I hope) simple question. If I connect outlander front stack to an ice engine and set generator motor to regen will I have a hybrid vehicle again? All running zombieverter of course.
A little explanation- I want to see if using small diesel engine will give better mpg than OEM 2 liter gas engine.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 1:50 am
by noquarter
noquarter wrote: ↑Fri Jan 30, 2026 8:53 pm
Done some testing at this point and we have been able to generate a voltage out of the inverter. But it seems to generate a voltage whether or not the inverter is powered up or not. This seems odd to me as I thought the IGBTs would prevent any power from flowing back when switched off?
With the inverter started and set to produce regen via offthrottleregen being set to -100, I did testing at 1500RPM connected to the ICE and then spun it all the way up to 3600RPM. It produced 70 volts at 1500 RPM and 95 volts at 3600.
I would really like to know what I could change to create a higher voltage as 95 volts isn't going to cut it. I am unsure what parameter regulates regen voltage.
Additionally, is there any way to confirm the HV switching is actually operating and rectifying AC? Since it seems to generate a voltage which the inverter started or not, I'm unsure of how to tell.
Ok just got done with some more testing. I was wrong about the voltages, it is in fact outputting voltage linearly with RPMs. 70 volts at 1550RPM (idle), 145v at 3600RPM. I was also incorrect about the voltage with the inverter shut off vs on, leading me to believe it is in fact switching and rectifying, but I still want to know if there's any way to confirm whether the regen is working properly.
Besides that, I still really would like to produce more than 145v. What parameters can I change to effect this?
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 7:28 am
by uhi22
An oscilloscope between a motor phase and DC minus would show the PWM in normal operation. So you should see a square wave with some kHz there.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 1:44 pm
by Jacobsmess
Would a prius inverter be a better option here. It can then boost the input voltage to the set point.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 2:43 pm
by johu
The inverter in regen mode will produce any voltage necessary to maintain the requested motor current (even until self destruction). The voltages stated seem with the inverter shut off, with only the parallel diodes rectifying motor voltage
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 5:33 pm
by noquarter
uhi22 wrote: ↑Sat Jan 31, 2026 7:28 am
An oscilloscope between a motor phase and DC minus would show the PWM in normal operation. So you should see a square wave with some kHz there.
Thanks for the tip. We'll try it out once we get a scope.
Jacobsmess wrote: ↑Sat Jan 31, 2026 1:44 pm
Would a prius inverter be a better option here. It can then boost the input voltage to the set point.
You may be right, but I want to stick to using the leaf inverters if possible for a variety of reasons. If absolutely necessary we may do it.
johu wrote: ↑Sat Jan 31, 2026 2:43 pm
The inverter in regen mode will produce any voltage necessary to maintain the requested motor current (even until self destruction). The voltages stated seem with the inverter shut off, with only the parallel diodes rectifying motor voltage
So there's nothing we can do to increase the voltage? This testing was done with zero load on the DC bus. We did do some testing with a 1/2hp DC frame motor which saw the same voltages, not that that's necessarily useful or relevant, just thought I'd mention. With inverter off, we measured different voltages vs when started. The voltage read both by a multimeter and the OI board was higher with the inverter OFF which seems to indicate it wasn't true DC. Again, waiting on a scope.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sat Jan 31, 2026 11:20 pm
by jrbe
Jacobsmess wrote: ↑Sat Jan 31, 2026 1:44 pm
Would a prius inverter be a better option here. It can then boost the input voltage to the set point.
I second considering this direction. The DC-DC converter seems to be able to do 100A, so if your voltage / amperage fits it may be a very good option. I dont think it has the adjustable voltage settings the way you need them but its worth looking at. Being able to not worry as much about rpm / kv means you may be able to run a lot more efficiently at lower speeds, if it fits your use case.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sun Feb 01, 2026 4:32 pm
by johu
Again, with regen set up correctly there is no point in a second power conversion stage.
Like my EM57 car still drives a lot of current into the battery even close to standstill. The inverter IS a boost converter seen from motor side
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sun Feb 01, 2026 6:45 pm
by noquarter
I still am at a loss as how to influence the actual output voltage of the inverter. Ideally I'd like a consistent ~300V or so at any RPM. But I would settle for less.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sun Feb 01, 2026 6:51 pm
by uhi22
My (weak) understanding is that the software is designed to drive a certain current into a nearly constant-voltage battery during regen, and without the battery the voltage would rise until self-destruction. I guess a constant voltage output without battery, and with changing load current, would need a different control strategy.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sun Feb 01, 2026 8:05 pm
by jrbe
johu wrote: ↑Sun Feb 01, 2026 4:32 pm
Again, with regen set up correctly there is no point in a second power conversion stage.
Like my EM57 car still drives a lot of current into the battery even close to standstill. The inverter IS a boost converter seen from motor side
I think this is new info to a lot of people. We've seen it work but have no idea how. Can you point us to anything to try to wrap our heads around this? And does it need a battery / buffer to work?
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Sun Feb 01, 2026 8:17 pm
by noquarter
uhi22 wrote: ↑Sun Feb 01, 2026 6:51 pm
My (weak) understanding is that the software is designed to drive a certain current into a nearly constant-voltage battery during regen, and without the battery the voltage would rise until self-destruction. I guess a constant voltage output without battery, and with changing load current, would need a different control strategy.
The voltages I've already measured were under no load. The voltage was stable as well, with the only variable being RPM. There must be some mechanism in place to carefully control the voltage at various current pull (different regen %), otherwise you wouldn't be regen below like 9000 RPM.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
jrbe wrote: ↑Sun Feb 01, 2026 8:05 pm
I think this is new info to a lot of people. We've seen it work but have no idea how. Can you point us to anything to try to wrap our heads around this? And does it need a battery / buffer to work?
If it were a super high bandwidth voltage control loop you might get away without a buffer. But it isn't that, the voltage sense itself is strongly low-pass filtered and merely used to not exceed a certain battery voltage (udcmax) at a slow time constant.
To imagine it you can basically forget the three phase details and imagine it as a DC motor connected to the low voltage side of a synchronous converter such as the one found in Prius. It can boost the low EMF voltage from the motor to an almost arbitrarily high (battery) voltage. The inductance needed is provided by the motor itself
Re: Using a PMSM and inverter to generate and regulate a DC voltage
I've attached the current params file. It's based on the em57/gen2 5.24 file in the parameters database with a few adjustments.
I believe most of the context is in the original post, but to re-iterate and add a few more details: we want to replace a conventional transmission with two leaf motors for the purposes of a tractor pull competition. ICE performance is fixed so efficiency of transmission is the goal. Hence why I'd like to reach a higher voltage than the 145v we have now, I presume higher voltage corresponds to higher efficiency.
Rules for the competition also prohibit "energy storage devices". We intend to find out what qualifies as "energy storage devices" so that we may include additional capacitance in the circuit if possible. We do have an idea to use a zener diode circuit with a large resistor and heatsink to essentially burn off voltage fluctuation above a set point - perhaps 400, 500 volts - as a safety on the system, and aggressive throttle smoothing to reduce sudden instantaneous voltage changes.
Other competitors have used such setups but I don't know the specific details of their designs. They may be air cooled BLDCs rather than PMSMs.
I hope that's enough info. We would consider passive rectification as well, but we thought the leaf inverter with regen would give us more control over voltage and greater efficiency.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Tue Feb 03, 2026 8:57 am
by johu
Ok, regen is set up correctly, except you want to set maxregentravelhz to 1 so it doesn't get in the way. Throttle (i.e. pot and pot2) have to sit at their respective minimum values for regen to be at its strongest. Finally a direction needs to be selected for the PWM to be active at all.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Tue Feb 03, 2026 7:28 pm
by noquarter
johu wrote: ↑Tue Feb 03, 2026 8:57 am
Ok, regen is set up correctly, except you want to set maxregentravelhz to 1 so it doesn't get in the way. Throttle (i.e. pot and pot2) have to sit at their respective minimum values for regen to be at its strongest. Finally a direction needs to be selected for the PWM to be active at all.
Okay, thanks. We'll test with the direction set tonight.
I think I'm beginning to understand what you were saying. Increasing load on the traction motor = increased resistance on the DC bus, which causes the generator motor to increase its voltage until destruction of the power electronics.
Two solutions come to mind, but maybe there's a better way:
1. Tune regen and throttle input to act together. This will still have a side effect of relying rather heavily on the zener diode circuit to protect our electronics, since any difference in the reaction time of either end of the circuit would cause voltage fluctuations.
2. A PID loop directly controlling regen amount based on voltage. This would likely be the better solution but more difficult to implement. Any chance it could be possible within the open inverter board itself or would an external system be required?
Thank you very much for your help we really appreciate it.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Tue Feb 03, 2026 8:33 pm
by uhi22
From what was written above I understand that the only solution is to patch the board to have a very fast DC-bus voltage measurement, and to patch the software to implement a voltage regulator (AKA PID loop). The other options (throttle input, external control loop are way too slow to regulate the voltage because the existing design aims for current regulation, and would drive the voltage into unhealthy ranges.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Wed Feb 04, 2026 1:54 am
by noquarter
uhi22 wrote: ↑Tue Feb 03, 2026 8:33 pm
From what was written above I understand that the only solution is to patch the board to have a very fast DC-bus voltage measurement, and to patch the software to implement a voltage regulator (AKA PID loop). The other options (throttle input, external control loop are way too slow to regulate the voltage because the existing design aims for current regulation, and would drive the voltage into unhealthy ranges.
Is it certain that an external control loop is out of the question? Assuming there is no appreciable latency for the throttle input on the OI board (with all relevant settings disabled), it should be almost equally fast more or less. Patching the OI board and messing with the firmware is probably beyond the skills of myself or anyone else working on the project. A microcontroller board with a voltage input and output running the PID loop would be more feasible.
Another idea, likely totally non-plausible, but figured I'd throw it out there: what if we simply replace the existing current sense with voltage sense instead and calibrate accordingly? Am I mistaken or is current sensing of no use in this application? Theoretically the method by which the current is regulated would be the same as how I intend to regulate the voltage, is it not?
Please forgive my lack of understanding if I am wrong about anything. I know this is a rather ambitious project but we really wanted to try something different here.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Wed Feb 04, 2026 3:55 am
by noquarter
Good news. We generated more voltage. Bad news, we generated more voltage.
PWM, was in fact, not on. We put power to the reverse pin, blew the inverter instantly. Good thing they're only $150.
I still don't quite understand what happened since there was nothing connected to the DC bus. But we blew the caps and the plot measured about 700 volts before the inverter went pop. Even with no load I guess regen should not be set to 100%, maybe we should bring it on gradually and observe?
More strongly considering passive rectification at this point.
Re: Using a PMSM and inverter to generate and regulate a DC voltage
Posted: Wed Feb 04, 2026 8:18 am
by johu
noquarter wrote: ↑Wed Feb 04, 2026 3:55 am
PWM, was in fact, not on. We put power to the reverse pin, blew the inverter instantly.
johu wrote: ↑Sat Jan 31, 2026 2:43 pm
The inverter in regen mode will produce any voltage necessary to maintain the requested motor current (even until self destruction)
No load on DC bus, requested current not reached -> "infinite" voltage
noquarter wrote: ↑Wed Feb 04, 2026 3:55 am
maybe we should bring it on gradually and observe?
Yes. And have a load.
I think this only has a chance if you go "load first". So request torque from the motor, then bring on regen from the generator. Stop regen on generator, stop requesting torque. And even then it will be brittle.