EcoModder Forum Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control

Register Now
 Remember

 10-21-2015, 03:23 PM #2211 (permalink) Permanent Apprentice   Join Date: Jul 2010 Location: norcal oosae Posts: 523 Thanks: 351 Thanked 314 Times in 215 Posts I've got a pretty simple simulation going on Simplis. The model uses ideal switches and ideal diodes as Paul suggested. For detail, I've added resistance in the battery pack, resistance and inductance in the power wires to the controller, resistance in the bus capacitor, resistance and inductance in the motor controller bus, and resistance and inductance in the motor load. The motor is wired as a wye connection with two inputs (with ideal switches) and one output with a pair of diodes returning to the input phases. **whew** For the resistance and inductance values, I've used parallel wire models. For the planer bus, I used PCB stacked stripline models. With all that, and the numbers matching the best I have for the values, I've discovered a few things, but it's still not good enough. For one, I think I've found two major issues with that paper: 1) They didn't include most of the parameters I listed above. For example, power source and capacitor resistance aren't included. This is huge, because the power supply could then supply ALL the current. If the bus capacitor and all the source impedance is included, the balance of current shifts dramatically to the bus capacitor. You could think of it as two loops: source > bus capacitor and bus capacitor > load. So far I've found the balance of current depends a lot on the duty cycle. The paper is right in that the highest capacitive current load is at 50% duty cycle. 2) They seem to make the assumption that the center of the wye is at 50% of the bus voltage. My testing with the above circuit shows the neutral point much closer to the output voltage (ground in this case) So, in this testing I've seen a number of interesting things. Of course this is just a model and I'd like to ensure it's kind of close to reality. . . In some ways, it can be considered a model of a locked rotor test. Since this is one of the harshest tests from a motor current perspective, that's good. I tried to figure out a way to include BEMF, but it may just muddy the results. If thingstodo, Paul, or anyone hanging around here have found different results in their real world testing. Please let me know - i'd like to make a useful model for this problem. The interesting stuff: 1) at 50% duty cycle, the current from the bus capacitor to a phase leg can be higher than the current out of the battery. 2) There are extremely high currents circulating back through the diodes into the input phase legs. They do seem to stabilize in the transient test, but the current in the output is in this case 2X the current in the input phase legs. In other words, the current circulating in that leg can be about 2.5X the current coming from the battery! 3) If the stuff mentioned above is correct, then the model can be used for modeling "ripple current" - which is HUGE compared to the current discussed in that paper. 4) The model doesn't really have a good way of looking at transient voltage spikes - Paul have you found this to be true in your simple model? It seems one might need to use "real" FET's and diodes to see these affects. Sooooo, I've found quite a bit ( 2X to 4X ) more capacitance than that paper recommends is needed. However, this big, low impedance capacitor (and bus system) may reduce voltage spikes significantly, reducing the voltage required for the switches and capacitor. Thoughts anyone? Once this model is sorted, I'll post it here. - E*clipse
 Today Popular topics Other popular topics in this forum...
Master EcoModder

Join Date: Sep 2010
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
 Originally Posted by e*clipse For detail, I've added resistance in the battery pack, resistance and inductance in the power wires to the controller, resistance in the bus capacitor, resistance and inductance in the motor controller bus, and resistance and inductance in the motor load. The motor is wired as a wye connection with two inputs (with ideal switches) and one output with a pair of diodes returning to the input phases. **whew**
I split this into a couple of posts - BOY DO I GET LONG-WINDED!

Would it simplify things a bit to model as 2 separate systems?

I put an X beside the parts that I think can be ignored for simplicity. The resistances and inductances should be really small?

Ideal Battery -> series resistance ->
ideal wire series resistance -> Xseries inductance ->
ideal capacitor series resistance -> parallel capacitance ->
ideal wire Xseries resistance -> Xseries inductance ->
Ideal battery

Set up the peak to peak or ripple voltage that is acceptable and find out the capacitance required if you 'take all of that energy out of the capacitor' as a step change

Then the second circuit is a bit simpler

Ideal capacitor -> series resistance ->
ideal wire series resistance -> Xseries inductance ->
ideal motor series resistance -> series inductance ->
ideal wire series resistance -> Xseries inductance ->
Ideal capacitor

The same peak to peak or ripple voltage (I think a triangular wave source added to the ideal capacitor may have worked ... this was 25 years ago in university so I'm a bit fuzzy) on the capacitor should illustrate the differences in the controller side as the ripple voltage is higher or lower.

In my uninformed opinion (OK - guess!), the worst case for capacitance should be when the triangular wave is at it's minimum (from the battery source) and the controller still needs to send a maximum duty cycle pulse to the motor?

 The Following User Says Thank You to thingstodo For This Useful Post: e*clipse (10-21-2015)
Master EcoModder

Join Date: Sep 2010
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
 Originally Posted by e*clipse If thingstodo, Paul, or anyone hanging around here have found different results in their real world testing. Please let me know - i'd like to make a useful model for this problem.
As for currents - V*I into your controller = V*I out of your controller, so if your input voltage is 100VDC and your output voltage is 7.17VAC (10 VDC peak to peak as an RMS value) then your current is 10X more on the output than on the input. That's one of the beautiful things about low ESR Capacitors as energy sources. Coulomb counting helps - you can't get more out of the capacitor than it can hold .. unless you count the charging current that the capacitor receives as the output voltage drops.

The currents through the diodes .. normal for IGBT on, but should relate to the energy stored by the motor's magnetic field, as it collapses when the IGBT turns off. The amount of time to collapse the field, and how the series resistance is split up in your model would likely have a large effect on the magnitude.

If you have anything in particular you'd like me to check during testing - a diagram helps. I have several uncalibrated 50A 100mV shunts, a clampon meter, 2 channel scope ... a couple of cheap multi-meters .. and I can take video of the measurements.

 The Following User Says Thank You to thingstodo For This Useful Post: e*clipse (10-21-2015)
Permanent Apprentice

Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
Quote:
 Originally Posted by thingstodo I split this into a couple of posts - BOY DO I GET LONG-WINDED!
That's exactly what I thought when I posted my question.

Quote:
 Would it simplify things a bit to model as 2 separate systems?
I don't think so. It's the inter-relatedness between the load and supply that is making this an interesting problem. I think if the two were seperated, it would require making some assumptions about the part left out. This could result in errors, like that paper.

Quote:
 I put an X beside the parts that I think can be ignored for simplicity. The resistances and inductances should be really small? Ideal Battery -> series resistance -> ideal wire series resistance -> Xseries inductance -> ideal capacitor series resistance -> parallel capacitance -> ideal wire Xseries resistance -> Xseries inductance -> Ideal battery
One of the interesting things I've found regarding the battery with all the resistance and line inductance thrown in - the current out of the battery is sinusoidal. That could have an effect on the capacitor fill rate, for example. BTW, the inductance and resistance I'm using for the battery are based on 00 wire running for about 3 meters. I'm assumming a worst case of batteries in trunk, front motor controller/motor. The battery resistance was taken from an ORNL test of a Nissan Leaf battery pack.

Quote:
 Set up the peak to peak or ripple voltage that is acceptable and find out the capacitance required if you 'take all of that energy out of the capacitor' as a step change
This is where it gets pretty dynamic, depending on the combination of switching frequency, capacitance, and duty cycle. We could eliminate one variable by looking only at the worst case, 50% duty cycle. However, switching frequency has a large affect on capacitor size. Just like boost converters, faster >> smaller inductor.

Quote:
 Then the second circuit is a bit simpler Ideal capacitor -> series resistance -> ideal wire series resistance -> Xseries inductance -> ideal motor series resistance -> series inductance -> ideal wire series resistance -> Xseries inductance -> Ideal capacitor
Here's where we're delving into stuff that causes the "traditional" methods fall short. SBE has quite a bit of stuff about reducing the bus inductance for best performance. Basically, the extremely low ESR of the capacitor opens an opportunity to further reduce other stuff. The other stuff, like bus inductance, is actually now relatively important because the other factors have been significantly reduced.

As you've stated, bus inductance has little/no affect on the current that the bus capacitor sees, because it is so small. Thus, a model to find the current rating of the capacitor doesn't need this detail. However it can lead to a significant turn-off spike, requiring higher voltage rating capacitors and switches.

Quote:
 The same peak to peak or ripple voltage (I think a triangular wave source added to the ideal capacitor may have worked ... this was 25 years ago in university so I'm a bit fuzzy) on the capacitor should illustrate the differences in the controller side as the ripple voltage is higher or lower. In my uninformed opinion (OK - guess!), the worst case for capacitance should be when the triangular wave is at it's minimum (from the battery source) and the controller still needs to send a maximum duty cycle pulse to the motor?
I guess I don't see accuracy of a triangle wave source. I think that was a good approximation back when inverters were running really slow and electrolytic capacitors were the only choice.

I did see a triangular voltage at the capacitor if I matched the capacitor to the load current well. If the capacitor is undersized, those waveforms look more like an ocean wave, with a curve near the end of the fill/empty. The current waveforms into the capacitor are very funky; they are sort of a step function, with an asymmetrical top and bottom.

Please - I'm - not downplaying this contribution. I really really appreciate it; it's definitely making me think more about this. Thank you!

At this point it looks like one SBE ring cap will do the job; it doesn't need parallel capacitors. Since the capacitors all have extremely low ESR - about 2 or 3 mOhms at 5>100khz, I'm just using 2.5mOhms for all the capacitor ESR values in various tests.

For the bus/capacitor inductance, I'm using values in the range of 5nH > 20nH, based on SBE tests with capacitors and a planer bus. Believe it or not, little details like the shape of a cut-out can significantly effect the current density at high frequencies. Fun stuff!

Thanks again,
E*clipse

 The Following User Says Thank You to e*clipse For This Useful Post: thingstodo (10-21-2015)
Permanent Apprentice

Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
Quote:
 Originally Posted by thingstodo As for currents - V*I into your controller = V*I out of your controller, so if your input voltage is 100VDC and your output voltage is 7.17VAC (10 VDC peak to peak as an RMS value) then your current is 10X more on the output than on the input. That's one of the beautiful things about low ESR Capacitors as energy sources. Coulomb counting helps - you can't get more out of the capacitor than it can hold .. unless you count the charging current that the capacitor receives as the output voltage drops. The currents through the diodes .. normal for IGBT on, but should relate to the energy stored by the motor's magnetic field, as it collapses when the IGBT turns off. The amount of time to collapse the field, and how the series resistance is split up in your model would likely have a large effect on the magnitude. If you have anything in particular you'd like me to check during testing - a diagram helps. I have several uncalibrated 50A 100mV shunts, a clampon meter, 2 channel scope ... a couple of cheap multi-meters .. and I can take video of the measurements.
Here is the crux of the problem and my distrust of the model.

Yes - energy in should = energy out. Otherwise, I have a perpetual motion machine! Woo Woo! Ummmm, off to the Unicorn corral with me.....

I think what I'm seeing is a lot of current going around in circles between the motor and the inverter. As you've said, the collapsing magnetic field should severely limit this. Right now, I'm using a simple inductor for a motor winding. Perhaps I should use some form of loaded transformer instead?

Regarding testing - have you done some locked rotor tests, where you measured the current in the motor phases and the battery? ORNL did test like this. Hmmm - I'm going to look - maybe they have some raw data.

Thanks again,
- E*clipse

 The Following User Says Thank You to e*clipse For This Useful Post: thingstodo (10-21-2015)
Master EcoModder

Join Date: Sep 2010
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
 Originally Posted by e*clipse Regarding testing - have you done some locked rotor tests, where you measured the current in the motor phases and the battery?
Not yet. So far, I'm trying to get through the tuning so I can get the load testing done.

Right now I am struggling with motor and coupling alignment (I am not good ith mechanical stuff!)

I can do locked rotor tests (to a limited current) but I'd have trouble instrumenting DC voltage, DC current, AC voltage * 3 and AC current * 3.

Particularly if the sampling needs to be simultaneous.

 The Following User Says Thank You to thingstodo For This Useful Post: e*clipse (10-21-2015)
 10-21-2015, 07:39 PM #2217 (permalink) PaulH     Join Date: Feb 2008 Location: Maricopa, AZ (sort of. Actually outside of town) Posts: 3,832 Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000 Thanks: 1,368 Thanked 1,202 Times in 765 Posts I think I could rig it where I sample the current going to the capacitor from the batteries, but I don't think I can get a path from the capacitor to the IGBTs. them sheets of copper is crazy wide and won't fit inside a current sensor hole. haha. __________________ kits and boards
 The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post: e*clipse (10-21-2015), thingstodo (10-21-2015)
 10-21-2015, 08:01 PM #2218 (permalink) PaulH     Join Date: Feb 2008 Location: Maricopa, AZ (sort of. Actually outside of town) Posts: 3,832 Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000 Thanks: 1,368 Thanked 1,202 Times in 765 Posts I've gotten current measurements for all 3 phases before though. They are just sine waves. And not messy sine waves either. Actual clean looking sine waves. Then, the current coming from the capacitor is currentCap = (duty1*current1 + duty2*current2 + duty3*current3)/3. But that's an average current I guess. But if we pretend that there's no help coming from the batteries, we could look at what happens for one period. We could assume that the current is constant the whole time, and figure out the voltage drop from the current and capacitance. __________________ kits and boards
 The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post: e*clipse (10-22-2015), thingstodo (10-21-2015)
 10-21-2015, 08:11 PM #2219 (permalink) Permanent Apprentice   Join Date: Jul 2010 Location: norcal oosae Posts: 523 Thanks: 351 Thanked 314 Times in 215 Posts I hear you guys on the measurement issue. Boy, did you check out what SBE is doing to get good numbers?? Cripes, you need a university EE lab to do that stuff: http://www.sbelectronics.com/wp-cont...r_May_2010.pdf Check out their planer bus design. I honestly think the design I posted here will be one step better. I think it would be good (from a design, not running necessarily) perspective to get accurate, synchronized data of the phase currents (just between the inverter and motor) Also It would be interesting to see the current on the bus - before and after the bus capacitor. Maybe it would be possible to use those little hall effect sensors that go on top of a bus bar? On another note, I managed to get the model closer to reality. I've added switch resistances on all phases and losses on the low side. Originally, I had one motor phase leg go directly to ground. Obviously that's not true. I also rotated the model to another quadrant of operation, where one phase leg feeds the other two. All this complication is making the model more accurate, in that the battery current and phase leg currents are getting closer to reality. I just discovered that there are more accurate "lossy" inductor models - if these work, the model will "look" a lot more simple. There is also a 3-phase transformer model. Perhaps this would be the way to more accurately model the motor? - E*clipse
 The Following User Says Thank You to e*clipse For This Useful Post: thingstodo (10-21-2015)
Permanent Apprentice

Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
Quote:
 Originally Posted by MPaulHolmes I've gotten current measurements for all 3 phases before though. They are just sine waves. And not messy sine waves either. Actual clean looking sine waves. Then, the current coming from the capacitor is currentCap = (duty1*current1 + duty2*current2 + duty3*current3)/3. But that's an average current I guess. But if we pretend that there's no help coming from the batteries, we could look at what happens for one period. We could assume that the current is constant the whole time, and figure out the voltage drop from the current and capacitance.
What i'm looking for is to break down a part of a sin wave so that you can actually see the switching affects. It should be pretty clean because of the high motor inductance. However you should see a "digitization" of the sine wave where the actual current is ramping around the ideal waveform. It seems in a locked rotor test, it would be possible to set things up so the input is in one phase and the output is in the other two; that's just a specific quadrant of operation. I suppose I could make the model work in any quadrant by matching the pwm duty cycles.

Whoah! Wait a minute. Maybe this is good enough. Really - It's purpose was to spec the capacitor. It's working for that. Maybe I'm getting too academic about this. If a good model seems useful for other stuff, I'll be happy to keep going on this. Otherwise I see some rapidly approaching diminishing returns.

*** edit ***
Perhaps I should see about the switching spikes on the bus at turn off. This will probably require non-ideal switches. I've read that the time lag for even a schottky diode to switch can cause some serious spikes.

This would be useful because we could design for these spikes, rather than just building in a 2x safety factor. This directly affects capacitor cost and size.
*****

- E*clipse

Last edited by e*clipse; 10-21-2015 at 08:29 PM.. Reason: move to spikes

 The Following User Says Thank You to e*clipse For This Useful Post: thingstodo (10-21-2015)