Page 8 of 11

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 1:56 pm
by celeron55
I reached overcurrent at ocurlim=650 and I think I'm not going to increase the limit.

When adding this final data point it looks like the torque curve flattens at 1200Nm and feeding more than 700A of phase current will only make more heat.

Now the question is, if the hundreds of amps used for -Id were instead added to Iq, would there be more torque? Based on my understanding, there should be. I have noticed the -Id/Iq ratio in this test has been roughly 1:1. For example at the 640A 1177Nm data point looks like the split was roughly Iq=250A Id=-250A. Any thoughts on this? I guess I'll try something in manual mode, but for normal mode the code to modify looks to be in FOC::Mtpa().
tscrot-2021-01-15_15-42-34.png

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 2:17 pm
by johu
Thats quite impressive. In fact at higher loads the reluctance torque created by -id outruns the magnetic torque created by iq. So you won't see more torque by shifting current over to iq.

That said, FOC::Mtpa() uses some hard coded values for the MTPA formula, I think they are from a Prius motor. I did some calculating samples in a spread sheet and found the resulting id and iq did not change very much when varying the inductance values. But if you want to tweak more that is indeed the right place. More specifically the constants fluxLinkage, lqminusldSquaredBs10 and lqminusld

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 2:46 pm
by slow67
Flux linkage is rpm per volt, so that can be calculated pretty easily. At that point you should only have to manipulate lq minus ld to tune the torque for higher currents.

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 3:20 pm
by celeron55
No need for any of that theory shmeory. I measured some data points and it was easy to make a conclusion. It was quite uncomfortable to use manual mode as I had to slowly ramp up the current by typing numbers with my frozen fingers in order to not disturb the system and cause loud bangs.
tscrot-2021-01-15_17-17-02.png

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 3:47 pm
by johu
Wait, you had your motor lift weights? :D

So if I interpret correct, MTPA gives you 367 Nm @ 280A and pure iq gives you 232 Nm @ 280A ? Now can the constants be somehow adjusted from that?

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 3:53 pm
by slow67
Maybe try just 2 steps, pre-loading with 100 amps for a second to take up all the slack, then do the full torque.

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 3:57 pm
by slow67
Try this spreadsheet to get a feel for Id vs Iq for your testing. Lower currents don't have as much effect, but also taper off with more current.

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 4:07 pm
by celeron55
If I went from 0 to 100A in an instant I'd need hearing protection and the fish scale might destruct. There's quite some bending and momentum in this test setup. Also, for some reason I couldn't get firmware updates to work so I'll probably skip modifying the code.

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 4:23 pm
by slow67
celeron55 wrote: Fri Jan 15, 2021 4:07 pm If I went from 0 to 100A in an instant I'd need hearing protection and the fish scale might destruct. There's quite some bending and momentum in this test setup. Also, for some reason I couldn't get firmware updates to work so I'll probably skip modifying the code.
The idea is a lower current to take up the slack, the bending shouldn't make much noise (from lower current to higher current)

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 4:30 pm
by celeron55
Well, anyway, it wasn't comfortable at all to use manual mode - I also had issues with precharge and contactor control. Using normal mode on the other hand did feel fairly safe and I could do a set of measurements with re-flashed firmware if someone has better MTPA parameters for this particular motor.

Re: Toyota MGR Rear Traction Transaxle

Posted: Fri Jan 15, 2021 4:37 pm
by slow67
celeron55 wrote: Fri Jan 15, 2021 4:30 pm Well, anyway, it wasn't comfortable at all to use manual mode. Using normal mode on the other hand did feel fairly safe and I could do a set of measurements with re-flashed firmware if someone has better MTPA parameters for this particular motor.
With a well tuned syncofs, spin it up with zero field weakening. record the max rpm and divide by the bus voltage (this is your rpm per volt). That should be static regardless. You should be able to then tune just the lqminusld parameter. If this was an externally available variable (wink wink) it could be tuned very quickly without firmware update every time

Re: Toyota MGR Rear Traction Transaxle

Posted: Sun Jan 17, 2021 6:11 pm
by celeron55
In tom3141's thread viewtopic.php?p=22570#p22570 we have lots of proof that the MGR won't do proper speeds without a voltage higher than what most are willing to set up their battery for. The obvious solution is using a boost converter, but that's not ideal.

Has anyone popped onto this forum with experience on rewinding motors?

Here's a photo from earlier in this thread. You can see there seem to be two wires coming from each terminal, the simple explanation being it's delta wound. That means there might be a chance of making it suitable for even higher voltage, which would be the most useless modification, unless you want to use it as a wind turbine generator or something.

As I understand it, rewinding a stator like this goes like this:
  • Cut one end of the wires off with a grinder flush with the stator core,
  • tap the rest out of the stator with a suitably sized metal rod and a hammer,
  • figure out how the coils were wound so that you can redo it in the same way but different
  • Add new insulating sheet around where the coils go
  • Make the new coils
  • Remember to add a temperature sensor somewhere in the coils
  • Tie the new coils in place using some kind of temperature resistant non-conductive fiber stuff, I mean... string
  • Coat it with some kind of temperature resistant non-conductive resin to keep it all in place
Overall it seems like a lot of work if you could just use software to control a boost converter instead.

There's actually a downside to rewinding also: You lose as much torque per current as you increase speed per voltage. Thus, it could be that a boost converter is actually the ideal solution, and Toyota was right all along.
statorwindingsconnectorclosup_zps52ca762c.jpg

Re: Toyota MGR Rear Traction Transaxle

Posted: Sun Jan 17, 2021 6:23 pm
by johu
On an old industrial motor I once reconnected the existing coils. Basically every phase consisted of 4 coils that were all connected in series. 4S1P so to speak. I changed it to 2S2P to half the voltage rating.
Are the coil ends accessible enough for that?

Re: Toyota MGR Rear Traction Transaxle

Posted: Sun Jan 17, 2021 6:24 pm
by tom3141
Thanks for mentioning on this thread. I was wondering today about the possibilities of rewinding. I have no experience so will be interested to see people’s thoughts.

Re: Toyota MGR Rear Traction Transaxle

Posted: Sun Jan 17, 2021 11:01 pm
by 180jacob
celeron55 wrote: Sun Jan 17, 2021 6:11 pm Has anyone popped onto this forum with experience on rewinding motors?
Here's a photo from earlier in this thread.
Here are a few more photos of a rewind in progress, to save people from hunting back through the thread like I just did: viewtopic.php?p=19577#p19577

Re: Toyota MGR Rear Traction Transaxle

Posted: Mon Jan 18, 2021 5:16 am
by celeron55
Wait a minute, why are there 12 wires coming out of the stator in the dismantling photo and what are those additional crimped connections? Is it wye wound after all, with two parallel windings?

Re: Toyota MGR Rear Traction Transaxle

Posted: Mon Jan 18, 2021 11:47 pm
by MattsAwesomeStuff
Just to point out again, there is someone on the DIY EV forums Giving Away an MGR, as long as you pay for shipping. He's on the Isle of Man (small island between Ireland and England).

https://www.diyelectriccar.com/threads/ ... st-1067999

Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 1:02 pm
by james@N52E01
I think we have the RX400H MGR tuned correctly with V4.97FOC running on a Gen 3 Prius Inverter. Found the bottom position for Syncoffs and the motor runs smoothly. The only issue I’ve found is that the motor is running in reverse. Is there a parameter to make the inverter firmware consider the opposite direction of rotation to be forward?

Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 3:57 pm
by bexander
james@N52E01 wrote: Tue Jan 19, 2021 1:02 pm I think we have the RX400H MGR tuned correctly with V4.97FOC running on a Gen 3 Prius Inverter. Found the bottom position for Syncoffs and the motor runs smoothly. The only issue I’ve found is that the motor is running in reverse. Is there a parameter to make the inverter firmware consider the opposite direction of rotation to be forward?
You can add 32768 (2^16 / 2) to your syncofs value to make the motor change direction.

Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 7:48 pm
by james@N52E01
Thanks Bexander, that makes sense but I suspect I have other issues then. My Syncoffs value is set to 54750 with the motor running fine in both directions (although it thinks reverse is forward and vice versa). The only other trough I found when searching for Syncoffs was around 21950 (approx 32768 less). The motor ran fine with manual Id but was not smooth at all when I applied the throttle.

Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 8:37 pm
by ZooKeeper
For clarity sake, "Forward" is clock-wise from the sensor connection side and anti clock-wise from the 3ph wiring side.

Assuming that is true, syncoff is not correct, been there, done that. Yup, I am "that guy" mentioned in a famous video that went from 0 to 62k in increments of like 100, before I know what the h#ll I was doing :O

Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 9:25 pm
by james@N52E01
Thanks ZooKeeper, happy to admit I don’t know what the h#ll I’m doing, just trying to follow to FOC tuning tutorial as closely as possible. At 54750 Syncofs I can push 100A Manualid and get no movement. It responds fine to the throttle but in reverse as below. Any ideas where I might have gone wrong?


Re: Toyota MGR Rear Traction Transaxle

Posted: Tue Jan 19, 2021 11:29 pm
by ZooKeeper
My uneducated guess (remember I found syncoff by accident) is that you need to be below 32k for it to run in the correct direction - I had that EXACT experience, albeit with a different >32k setting.

Re: Toyota MGR Rear Traction Transaxle

Posted: Wed Jan 20, 2021 8:54 am
by bexander
james@N52E01 wrote: Tue Jan 19, 2021 7:48 pm Thanks Bexander, that makes sense but I suspect I have other issues then. My Syncoffs value is set to 54750 with the motor running fine in both directions (although it thinks reverse is forward and vice versa). The only other trough I found when searching for Syncoffs was around 21950 (approx 32768 less). The motor ran fine with manual Id but was not smooth at all when I applied the throttle.
I was unclear. If 54750 gives you reverse direction when selecting forward, subtract 32768 and you end up with 21982. This should then give you forward rotation when selecting forward. Nothing strange going on.
To my understanding 0-65535 corresponds to 0-360 degrees so adding or subtracting 32768 is equal to changing syncofs by 180 degrees i.e. change of rotation direction of the motor.

Re: Toyota MGR Rear Traction Transaxle

Posted: Wed Jan 20, 2021 3:44 pm
by ZooKeeper
bexander wrote: Wed Jan 20, 2021 8:54 am To my understanding 0-65535 corresponds to 0-360 degrees so adding or subtracting 32768 is equal to changing syncofs by 180 degrees i.e. change of rotation direction of the motor.
mine as well :D