Page 3 of 3
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 12, 2022 6:06 pm
by Bigpie
LeonB wrote: ↑Fri Aug 12, 2022 5:44 pm
]
https://github.com/BraunsCNC/stm32-sine-prius3 (master branch for MG1, other-fw-control for MG2). In essence, the MG2 firmware uses a field-weakening approach where the currents fwId and fwIq are only dependent on the speed of the car. Not ideal, but it works for me to get rid of unwanted acceleration/ braking. It furthermore supports the use of a quite high syncadv values by decreasing syncadv at a certain frequency to, again, prevent any unwanted acceleration/ braking. High syncadv helps to get a lot more power from the motor (at least with my setup).
At low and medium speeds, the car drives very nicely. Only at high speeds (~100km/h), the car gets a little jerky when letting go off the throttle. But there is no unwanted regen/ acceleration anymore as long as I don’t it push above 130km/h.
Is there a summary of the changes? I wondering if this will help with starting torque on my outlander front motor.
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 12, 2022 7:00 pm
by LeonB
johu wrote: ↑Fri Aug 12, 2022 6:01 pm
Gratulation
Thanks
johu wrote: ↑Fri Aug 12, 2022 6:01 pm
Very large milestone. Did Ulrich Siebold do the inspection? Where are you located?
He currently isn’t available, but one of his colleagues familiarized himself with the approval process and subsequently approved the Golf. I am lucky that Göttingen is my daily commute and the TÜV here seems to be very open towards EV conversions.
Bigpie wrote: ↑Fri Aug 12, 2022 6:06 pm
Is there a summary of the changes? I wondering if this will help with starting torque on my outlander front motor.
The whole firmware started off with a botch to fix a problem which created more problems that got fixed with even more botches. It’s a bit hard to document all these changes and I don’t expect this firmware to get any use outside of my conversion as it is not the "right way” to do it. But it works good enough in my case (after dozens of hours of tuning and hundreds of kilometers driven) and maybe someone can get some inspiration out of it. The most importand changes are within the current processing and syncadv calculation.
Starting torque also isn’t really affected by syncadv, it’s power increase is mostly above 20km/h.
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 12, 2022 8:12 pm
by Bigpie
Ahh, I'll not bother giving a go in that case
good to see a prius motor job on the road
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 26, 2022 7:39 am
by Ev8
Hi Leon, any chance you can post a compiled version of your mg2 software, I wouldn’t mind giving it a test on my rx400h mg2, I just don’t have the ability to compile, something I really should look at again but last time o looked at trying to compile stm32 in windows it was over my head!
Thanks
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 26, 2022 4:32 pm
by LeonB
Ev8 wrote: ↑Fri Aug 26, 2022 7:39 am
Hi Leon, any chance you can post a compiled version of your mg2 software, I wouldn’t mind giving it a test on my rx400h mg2, I just don’t have the ability to compile, something I really should look at again but last time o looked at trying to compile stm32 in windows it was over my head!
I attached the files. You may want to have a look at this post here, compiling can be fairly easy
viewtopic.php?f=7&t=267#p3179
A little bit about the tuning process: Start with all the frqgain values at 0 (curkpfrqgain, syncadvOffs, … =0). Also set fwIdMid and fwIdEnd to 0 (same with fwIq). Start by adjusting curkp and curki to get a smooth ride without any torque oscillations/ unwanted accelerations. Do this with syncadv <10.
Then you can try to increase syncadv and see if it increases the power of your motor. If so, find the value for maximum power. This will probably result in unwanted braking at high speeds and unwanted acceleration at even higher speeds. You can remove this acceleration by roughly finding the motor frequency at which the acceleration starts (this is your syncadvstart) and the set syncadvEnd to your fmax. Then you tune syncadvOffs so that the unwanted acceleration is no more. That’s probably around syncadvOffs =10.
All this time you will most likely suffer from unwanted regen as soon as you release your throttle pedal. This can be removed with fwId and fwIq. Starting at the frequency fwFrqStart, fwId is ramped up till it hits fwIdMid at fwFrqMid. Then it is further ramped to fwIdEnd at fwFrqEnd. Same with fwIq. The reason for fwFrqMid and fwFrqEnd is that your ideal fwId and fwIq values change with your syncadv value. So as syncadv is ramped down, fwId and fwIq also have to change.
For me the tuning process worked best by starting with all fw currents = 0 and then increase them while watching the current from the regenerative braking. You obviously want to minimize that.
Good luck and remember that this firmware is experimental. I have been using it for over 1000km so far without any significant problems, but your experience may vary
.
Speaking of which, the last two weeks the Golf has been driven daily without any problem. Consumption is a bit high at 16-18kWh/100km but I am also running it without regenerative braking at the moment. The Prius motor is well adequate for a car this size (total weight is <900kg).
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Fri Aug 26, 2022 6:01 pm
by Ev8
Thanks Leon I will give it a try when I have a day off and time to do tuning
Re: Golf 2 with Prius Gen 3 Motor and Inverter
Posted: Wed Nov 02, 2022 10:24 pm
by Bigpie
LeonB wrote: ↑Mon Jun 20, 2022 11:26 pm
.
One thing that bugged me for quite some time was the low current output of the inverter. I could only do a max of 200A on MG2 before overheating while for example the wiki states up to 500A. .
My cutting out issues with the gen3 inverter have all but been cured by a fix found on the simulation thread
viewtopic.php?t=2611 dont think it's made it to release yet. I was struggling to get 40kw and now 70kw isnt an issue. I think it was some pwm value overflow