Ampera/Volt inverter with Lebowski brain

Electric Motors and Controllers
arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 06 2019 3:10pm

OK i tried to measure leaf motor ohm resistance. I used 30V and 10A as a reference. Result was 110.5mV. I tried all phase wires variations.
Therefore if i use ohm law.... and get 0,01105ohm = 110.5mohm
Then i divide this to get one legs worth of 55.25mohm!
Would that be correct?

I dont have more power at this time. The best i can do with would be Prius Aux DCDC converter through 9x H4 lightbulbs at 80A. But it will have to wait for tomorrow since i would have to drag the motor to Ampera battery to have the supply.

EDIT: I tried again with 20A PSU. I got 220.4mV so now i got 55.1mohm for resistance!

A

kiwifiat   100 W

100 W
Posts: 200
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

Re: Ampera/Volt inverter with Lebowski brain

Post by kiwifiat » May 06 2019 7:14pm

arber333 wrote:
May 06 2019 3:10pm
OK i tried to measure leaf motor ohm resistance. I used 30V and 10A as a reference. Result was 110.5mV. I tried all phase wires variations.
Therefore if i use ohm law.... and get 0,01105ohm = 110.5mohm
Then i divide this to get one legs worth of 55.25mohm!
Would that be correct?

I dont have more power at this time. The best i can do with would be Prius Aux DCDC converter through 9x H4 lightbulbs at 80A. But it will have to wait for tomorrow since i would have to drag the motor to Ampera battery to have the supply.

EDIT: I tried again with 20A PSU. I got 220.4mV so now i got 55.1mohm for resistance!

A
That is incorrect at 20 amps , R=V/I= 0.2204/20/2 = 0.00551 Ohms or 5.51mOhms.
Similarly at 10 amps, 0.1105/10/2 = 0.00552 Ohms or 5.52mOhms.

I will measure my Gen2 motor and report back.
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

User avatar
Arlo1   100 GW

100 GW
Posts: 8375
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Ampera/Volt inverter with Lebowski brain

Post by Arlo1 » May 06 2019 9:46pm

Amber you just need to know phase to phase resistance. All you do is flow power in 1 phase wire and out another leaving the third unhooked.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 07 2019 2:03am

kiwifiat wrote:
May 06 2019 7:14pm
arber333 wrote:
May 06 2019 3:10pm
OK i tried to measure leaf motor ohm resistance. I used 30V and 10A as a reference. Result was 110.5mV. I tried all phase wires variations.
Therefore if i use ohm law.... and get 0,01105ohm = 110.5mohm
Then i divide this to get one legs worth of 55.25mohm!
Would that be correct?

I dont have more power at this time. The best i can do with would be Prius Aux DCDC converter through 9x H4 lightbulbs at 80A. But it will have to wait for tomorrow since i would have to drag the motor to Ampera battery to have the supply.

EDIT: I tried again with 20A PSU. I got 220.4mV so now i got 55.1mohm for resistance!

A
That is incorrect at 20 amps , R=V/I= 0.2204/20/2 = 0.00551 Ohms or 5.51mOhms.
Similarly at 10 amps, 0.1105/10/2 = 0.00552 Ohms or 5.52mOhms.

I will measure my Gen2 motor and report back.
Uh i botched the first mOhm calc. One decimal! I kinda quickly assumed the rest from proportion.
That now looks like the controller knows what its doing. Damn!

I will somehow figure out the current supply for serious amps today...

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » May 07 2019 3:27am

Hm, looks like a factor 10 off from the 50mOhm the controller needs. Probably the DC resistance is not the way to measure this.

When you apply an AC current to the motor windings you get losses which will not show up when applying DC. An example, the losses from Eddy currents in the stator iron. Other examples are skin effect or permeability losses. These (and other) losses are all electrically modelled as a resistor, and this is what the controller cares about (the resistor at the typical motor speed AC, not at DC)….

I would try values higher than 50 mOhm to see where the upper end of the stability is, and take the logarithmic average. So below 50mOhm it conked out, at 50 its OK, when you go higher you will find values where it is still OK before it starts to conk out again. The logarithmic average of R1 and R2 is then sqrt (R1 * R2)

kiwifiat   100 W

100 W
Posts: 200
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

Re: Ampera/Volt inverter with Lebowski brain

Post by kiwifiat » May 08 2019 8:53pm

arber333 wrote:
May 07 2019 2:03am
kiwifiat wrote:
May 06 2019 7:14pm
arber333 wrote:
May 06 2019 3:10pm
OK i tried to measure leaf motor ohm resistance. I used 30V and 10A as a reference. Result was 110.5mV. I tried all phase wires variations.
Therefore if i use ohm law.... and get 0,01105ohm = 110.5mohm
Then i divide this to get one legs worth of 55.25mohm!
Would that be correct?

I dont have more power at this time. The best i can do with would be Prius Aux DCDC converter through 9x H4 lightbulbs at 80A. But it will have to wait for tomorrow since i would have to drag the motor to Ampera battery to have the supply.

EDIT: I tried again with 20A PSU. I got 220.4mV so now i got 55.1mohm for resistance!

A
That is incorrect at 20 amps , R=V/I= 0.2204/20/2 = 0.00551 Ohms or 5.51mOhms.
Similarly at 10 amps, 0.1105/10/2 = 0.00552 Ohms or 5.52mOhms.

I will measure my Gen2 motor and report back.
Uh i botched the first mOhm calc. One decimal! I kinda quickly assumed the rest from proportion.
That now looks like the controller knows what its doing. Damn!

I will somehow figure out the current supply for serious amps today...
Ok so I ran two 75 watt headlight bulbs in series with a 6S lipo pack and got 3.9 Amps and 54.8mV voltage across the motor terminals in the case measuring with a Fluke 87V so that gives 0.548/3.9/2 ~ 7mOhms . So even at low current we are getting results in the same range so it looks like your measurements are accurate.
“You never know if quotes on the internet are genuine.” - Abraham Lincoln

User avatar
Arlo1   100 GW

100 GW
Posts: 8375
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Ampera/Volt inverter with Lebowski brain

Post by Arlo1 » May 08 2019 10:14pm

Yeah I think I measured 10mohm
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 09 2019 12:31pm

Guys i have to finish my work until tomorrow, then i can get to my friend and test the manual FOC range with Mazda in drive mode.
Also i suspect my results might be different since i use 360Vdc battery and he has 200Vdc.
Untill then...

A

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 10 2019 2:12pm

Ok

I can now report that i made some improvement and some not so much...

1. I tried to change PLL frequency and damping. It didnt work I got serious vibration on any change. I reset this to 100hz and 0.8
2. I changed n setting in control loops to 0 or to 24 and 48. The best was at 48. With 0 motor would release strange noises if pusshed hard uphill. I changed option c from 96k back to 24k since 96 caused jumpy start.
3. I tried to set motor current at 500Arms to get more womp and motor tripped overcurrent. Why? I had to give it 400Arms back.
4. I tried to vary R from 48, 52, 55, 64, 80. At 55 it still pulled. at 64 there was some instability. At 80 motor released strange noises and refused to start uphill. We had to use 100% throttle to move it.

My observations are
a. motor still vibrated when starting. it seems to be connected to PLL settings. But i only managed to disturb sensors. Can you help Bas?
b. I dont like the rocking even when moving, still PLL it seems
c. I think 48 or 50 are the best settings for this motor.
I dont think we reached correct power for that motor yet...

Video as prommised
https://www.youtube.com/watch?v=srfAZa_ ... e=youtu.be
btw, what is that sound at the beginning?

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 12 2019 2:29pm

Here is the file from last settings from the drive in the video.

Bas would there be any vital settings to change if i use 200Vdc vs if i use 380Vdc? Where in the FOC would i have to change if i wanted to get a similar response?
Right now i get good take off with phase current set to 400A and i get overcurrent if i select 500A and autocomplete. Other control loop settings dont change at all.

And i noticed car is good up to 120km/h and by than throttle is unresponsive. Would i need to increase FW current?

tnx

A
Attachments
lebowski2.txt
(2.42 KiB) Downloaded 49 times

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » May 13 2019 1:28am

If you use 200V instead of 380V the FOC measurement needs to be re-done (see the manual). As this changes the R you also need to re-enter the 50 mOhm. Even though indicated L and R (should) stay the same, the internal variables that are used throughout the controller IC depend on the voltage used during FOC measurement. So if you change the voltage the (internal) L and R need to be updated, even though the motors L and R have not changed.

If you are using battery voltage measurement (for optimal FOC operation) make sure that with the new battery voltage the voltage measurement pin sees between 2.5 and 5V.

Yep you need to increase field weakening current. I would increasing it in a few steps until it is roughly 70% of your max phase current. There is no need to change the max phase current as the controller takes this into account. Having a correct L and R is important for field weakening, so re-do the FOC measurement when making a mayor battery voltage change !

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 22 2019 12:22am

I got my motor in the Peugeot 406 now. Soon i will be able to test for myself the full extent of RPM and power the motor will provide.
https://leafdriveblog.wordpress.com/201 ... ame-is-in/

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 28 2019 11:54pm

I spend some time in Mazda RX8 yesterday. I did like you said and corrected/updated all menus. I put 300A to field weakening, some 75% and i found out motor wanted to turn to 9000rpm on 200Vdc! I reduced erpms then to 35kerpm and it is turning healthy up to 8Krpm. After a short but interesting drive i can confirm that power is no problem at high speed.
There was an instant when after start in 2nd gear motor would overrev and controller would reset. But it picked up quickly and i see i need to shift to 3rd after 5Krpm. 3rd is universal around town, while 4th and 5th can be used on highway.

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » May 29 2019 9:49am

Interesting drive in what way ?

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 30 2019 12:03am

Lebowski wrote:
May 29 2019 9:49am
Interesting drive in what way ?
There was lots of power available once motor started reving. From the stop however i would still have to start with 1st or 2nd. 3rd would stall the motor. Is that just the way FOC works or are there some settings to file out...?
Also like i said if i would take the motor in 2nd from start to max revs at 30Kerpm it would trip current limit at some 6000rpm. So we decided it is best to drive and upshift at cca 5000rpm.
200Vdc are causing weakening to start as soon as 4000rpm and you can hear this as grumbling soound from the motor which is still responsive enough. Speeds up to 140km/h are easy now. I still have to try local highway hill for max climb speed.

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » May 30 2019 5:14am

I am looking at the lebowski2.txt file from a few posts ago.

Maybe it is tripping (? you mean conking out ?) at high erpm because the settings in the erpm menu:

Code: Select all

a) erpm limiter (forward) rampdown start, end: 49.97, 50.00 k-erpm
you need to give it some room to ramp down the power as erpm approaches the limit. So use for instance 45, 50 k-erpm . Then it will gently ramp down max torque current once it reaches 45 kerpm, to 0 current at 50 kerpm. With 49.97, 50 as you have it it will shut down all at once, which can cause conk-out. Better to have it ramp down over a few k-erpm.

At 4000rpm (16k-erpm ?) you say it starts to loose power, probably because the controller is at max voltage ? The grumbling may then come from it running into the voltage limiter:

Code: Select all

j) invoke fieldweakening at amplitude: 95 %
k) reduce throttle from amplitude: 98 %
l) to closed throttle at amplitude: 100 %
The grumbling may be the controller ramping down power too quickly once it reaches max output voltage. Again a ramp reduces motor torque current as it reaches the % of output voltage as under k, to 0 current at the % of under l. So maybe a more gentler ramping down will help here and prevent the grumbling:

Code: Select all

j) invoke fieldweakening at amplitude: 93 %
k) reduce throttle from amplitude: 95 %
l) to closed throttle at amplitude: 100 %
With the settings above it will ramp down over 5% (so starting at 95%). Note that option j) should be a few % below option k. Above the % of option j) it will start the fieldweakening, which should start before it starts ramping down the power (option k).

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » May 30 2019 6:27am

1. Tripping
Both; i mean tripping overcurrent at some 4Krpm as well as conking out at 8Krpm.

2. eRPM setting
Now i have erpm set to 35Kerpm, which is some 8K motor rpm. But it is set exactly to the value. Thanks for explanation, i will set the difference ramp for all you explained.

3. What about the difficult starts? Even in 2nd gear it needs a lot of effort to takeoff smoothly. Especially uphill. In 3rd it can start, but it has to be very level. I remember some PM motors easily starting uphill with FOC software.
Here unsucessful start results in oc limit and controller reset. Any suggestion where to start tuning?

I will attach latest txt file asap. My laptop fan died and i cant start it up. I have to wait for a new fan...
I like to learn by experiment and now you gave me some "how tos" which will help me to expand my tests.

EDIT: Damn, my laptop bought the farm and i cant get my data off. I have to get another laptop first.... bare with me please.

tnx
Last edited by arber333 on Jun 11 2019 7:27am, edited 1 time in total.

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » May 30 2019 7:26am

Point 1 may still be caused by motor resistance not correct, you will need to experiment a bit. Or have a look in the saved conkout data (main menu y, only if you online saved else itll just be the old data) to see what happened.

About takeoff, if at full current the torque is not enough it wont go. But you should be able to give full throttle also at standstill, it should not conk out. FOC keeps tight control of motor curent, and does not allow for a few seconds of uncontrolled high current (which is what most ebike controllers do). Can you compare the torque of your electric motor with the ICE that was originally attached to the gearbox ?

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » Jun 13 2019 7:11am

Lebowski wrote:
May 30 2019 7:26am
Point 1 may still be caused by motor resistance not correct, you will need to experiment a bit. Or have a look in the saved conkout data (main menu y, only if you online saved else itll just be the old data) to see what happened.

About takeoff, if at full current the torque is not enough it wont go. But you should be able to give full throttle also at standstill, it should not conk out. FOC keeps tight control of motor curent, and does not allow for a few seconds of uncontrolled high current (which is what most ebike controllers do). Can you compare the torque of your electric motor with the ICE that was originally attached to the gearbox ?
Hm... Mazda Wankel motor makes 211Nm at 5500rpm, Nissan Leaf makes 280Nm up to 2800rpm then it goes into isopower knee. At 5000rpm it has some 150Nm torque left still. That is with 360Vdc battery.
However i think this could vary with different voltage. I could provide 420Vdc and could move the knee to the right by some 2000rpm. Then i would get 250Nm at 5000rpm which i intend to do later with my car.

Limitation here is the rating of IGBT modules really.

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » Jun 13 2019 7:59am

arber333 wrote:
Jun 13 2019 7:11am
Nissan Leaf makes 280Nm up to 2800rpm then it goes into isopower knee.

However i think this could vary with different voltage. I could provide 420Vdc and could move the knee to the right by some 2000rpm. Then i would get 250Nm at 5000rpm which i intend to do later with my car.

Limitation here is the rating of IGBT modules really.
The Leaf numbers point to 82 kW of power, so battery current combined with (sagging) battery voltage have to be able to reach this power level... Note also that in the controller IC the battery current is DC, while phase current settings are for PEAK of sinewave values... Also if the phase current setting is too low it will never reach the battery current limit (I mean, 100 A phase will never lead to 300A battery current). At max output battery DC current can be 85% of PEAK phase current (with 100A phase it will ever only reach 85A DC battery current).

arber333   100 W

100 W
Posts: 135
Joined: Mar 29 2013 4:13pm

Re: Ampera/Volt inverter with Lebowski brain

Post by arber333 » Jul 19 2019 1:44am

I would like to ask if someone has experience with paralelling IGBTs for more power.
My intention is to put 2x 6bridge (3phase) inverters in paralel. Controler in question is Lebowski with Chevy Volt 2x 600A inverter bridges which are sharing DC link.
I would connect 3 phases on the output. Also i would connect driver signals so there would be a single signal opening paralell IGBTs.
Current sensor i would setup in such a way that it would observe 1/2 of the signal. I would use sensors on one side only with normal sensor coefficient so it would in effect give 2x the current with one sensor protection even though it would only observe one side... risky? I would of course try to reduce max current to a managable value like 400A so i would get like 2x 400A per phase..... Also i will connect both Fault outputs.
I am betting if i keep my paralel tracks short and i keep 3phase cables the same there would not be much shootthrough.
Does anyone has a way to integrate current sensor signal and signal any anomalies?


What do you think the results would be?

User avatar
Arlo1   100 GW

100 GW
Posts: 8375
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Ampera/Volt inverter with Lebowski brain

Post by Arlo1 » Jul 19 2019 11:25am

Sounds sketchy AF. The most reliable way is to make sure the igbts are paralleled at the igbt. Not running two 3phase Inverters then paralleling the outputs.
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » Jul 19 2019 12:32pm

Dont thjnk parallelling two output stages is a problem, but I would definitely use all 6 current sensors then ! You can add the current sensor outputs using resistors.

User avatar
Arlo1   100 GW

100 GW
Posts: 8375
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: Ampera/Volt inverter with Lebowski brain

Post by Arlo1 » Jul 19 2019 2:49pm

Lebowski wrote:
Jul 19 2019 12:32pm
Dont thjnk parallelling two output stages is a problem, but I would definitely use all 6 current sensors then ! You can add the current sensor outputs using resistors.
With 1 brain? How do you distinguish between current sensors?
Does your project need a high performance motor drive, battery charger or other power electronics developed? Let's talk!
www.powerdesigns.ca
Leaf motor controller build. http://endless-sphere.com/forums/viewto ... 27#p963227
YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
Never above 4.2v never below 2.7v EVER!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

User avatar
Lebowski   1 GW

1 GW
Posts: 3381
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: Ampera/Volt inverter with Lebowski brain

Post by Lebowski » Jul 19 2019 3:48pm

You dont, just have to match wiring length and trust inductance and ptc to equalize the currents...

Post Reply