Golf 2 with Prius Gen 3 Motor and Inverter

Tell us about the project you do with the open inverter
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

I have done a lot of test drives in the last weeks and although I made some progress, the motor is still not working as expected.
Mainly, the unwanted regen is still there, although it is shifted to only happen above ~2800rpm and it feels not as strong as in the beginning, even though it can reach ~50A regen current. This is at curkp=250, curki=3000, curkigain=0, syncof=47500, syncadv=10. Increasing syncadv decreases this regen current all the way to 15A at syncadv=40 and increases the subjectively perceived torque at sthe same time. At this high value however, the car accelerates on its own when letting go off the throttle above ~5500rpm.
Here (viewtopic.php?p=38910#p38910) it is mentioned that syncadv should stay at ~10, as it is just meant to compensate the time lag of the resolver readings at high rpm. So I stopped experimenting with it.

I have also tried every one of the 4 permutations of the resolver pair polarity combinations, but two of the combinations didn't worked at all and the other two were identical. Going through the whole range of syncofs values also did not reveal any improvement.
Thus, my latest attempt was to modify the firmware (v5.17) with custom MTPA constants that I found online for the Prius Gen3 motor:

Code: Select all

static const s32fp fluxLinkage = FP_FROMFLT(0.124);
static const s32fp lqminusldSquaredBs10 = FP_FROMFLT(0.00074); //additional 10-bit left shift because otherwise it can't be represented
static const s32fp lqminusld = FP_FROMFLT(0.00085);
Furthermore, I integrated the corrected (?) MTPA formula from here (viewtopic.php?p=28867#p28867).

Code: Select all

   s32fp term1 = fpsqrt(fluxLinkage2 + ((lqminusldSquaredBs10 * isSquared) >> 7));
   idref = FP_TOINT(FP_DIV(fluxLinkage - term1, 4*lqminusld));
   iqref = sign * (int32_t)sqrt(isSquared - idref * idref);
I also tried the original MTPA formula and it feels like the correct one causes more torque at low rpms, however there seems to be no difference at high rpms between the two. Sadly, there is also no difference compared to the original constants, the unwanted regen remains unchanged.

Here is another interesting plot when driving downhill: (parameters from above were used, ffwstart = 400Hz = 6000rpm -> no field weakening)
downhill.png
The car accelerates till 81852 where I completely let go off the throttle. Unwanted regen starts off at ~35A and tapers off to 20A at 83800. The motor stutters barely noticeable and then just freewheels with 0A. As I am going downhill, the rpm starts to increase again but there is no regen current. Hence, it seems the unwanted regen is not dependent on rpm alone.

Other notable quirks of the car are, that torque and power feel really good at low rpm (motor input current ~100A), but quickly taper off (e.g. only 60A at 5000rpm). It seems like the inverter can't push il1 and il2 above 90A (slightly dependent on syncofs), no matter how high I set my throtcur.
Also, driving backwards at syncof=47500 causes the inverter to quickly heat up and overheat. Lowering syncofs to 41000 gets rid of the overheating, however the motor now has only very little torque in forward direction.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Thanks for those experiments. The behavior in reverse reminds me of my Leaf setup with wrong pinswap.
I think I'll make an MTPA-less firmware again that lets you configure throtid/throtiq separately.
Question: I take it that you disabled regen via parameters?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

johu wrote: Mon Apr 18, 2022 2:56 pm Question: I take it that you disabled regen via parameters?
Yes, brkmax etc. are set to zero.

One thing I noted and that is also visible in the plot above is, that the absolute value of id increases when letting go off the throttle. I would expect both iq and id to immediately (or as fast as the PI controller are able to) go towards zero, just like they do after the unwanted regen. I redid the same scenario as above (equal parameters, driving downhill) but plotted uq and ud as well:
downhilluduq.PNG
So before letting go off the throttle, ud seems to already max out at ~-35000. (this may be connected to my rather low power at high rpm?). Immediately after letting go off the throttle pedal, it jumps to ~35000 and again, reaches a maximum value as it seems. So the PI controller wants to increase id to 0 but as a result, id decreases even more? This goes on till id slowly creeps close to 0 and then suddenly everything is ok again. No unwanted regen, id=iq=0 and ud and uq are at some sane value, opposing the back-emf. So there definitely is a problem with id and its PI controller not being able to control it.


I also quickly tried the firmware with an alternate fw controller (viewtopic.php?p=38670#p38670) and implemented my MTPA constants and the new formula. I also used the parameters linked in that post. On the one side there is no unwanted regen anymore, however now the car just accelerates on its own when going above 2800rpm and only stops so when bringing the car to a full stop. As soon as the car goes into auto-acceleration, ud is maxed out again:
autoacceleration.PNG
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

johu wrote: Mon Apr 18, 2022 2:56 pm The behavior in reverse reminds me of my Leaf setup with wrong pinswap.
I guess you are referring to the resolver sin/cos pinswap and not current/PWM pinswaps? I tried that (although not in software, but in hardware) and there was no difference overall, except that I needed to subtract 32768 from syncofs to get good forward performance again.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

No, actually the current/PWM swaps. Not sure how well established those are for the Gen3 inverter
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

I currently got pinswap set to 8 (1000) for switching to phase 2 and 3. So I would now try 9 (1001), 12(1100) and 13 (1101), correct? Just want to make sure as the last time I accidentally got pinswap wrong, my HV wiring got a bit toasty.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Unfortunately the Prius board has no anti-toasty-technology, i.e. it lacks the comparator that shuts down the power stage at some arbitrary AC current. A sane decision BTW as Toyota do this job on their gate drive board but of course it adds excitement when trying out random software and parameters.

Otherwise, yes, that's what you would want to try. You can also do this analytically without toasting. You have to find out which PWM channel passes through which current sensor.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Speaking of random software: viewtopic.php?p=39150#p39150
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

johu wrote: Tue Apr 19, 2022 6:49 pm [...] but of course it adds excitement when trying out random software and parameters.
I’m ok with that when everything still sat on a workbench, but having it in a nearly finished car is a different story 😉. Hence, I started by connecting HV through the precharge resistor only:
Starting with pinswap 9: Inverter in manual mode, when requesting manualid=1 the web interface reported id =1A and iq =2A. Doesn’t seem right. Pinswap=13 caused the same behavior. Pinswap=12 resulted in id=1A and iq=0A and correctly responded to throttle input. Sadly, there is no difference when driving: Inverter quickly heats up when driving backwards, there is still unwanted regen and ud quickly reaches a maximum.
There also seems to be a bug in the software: When saving pinswap 12 to flash and restarting the inverter, the web interface correctly shows pinswap 12 but as soon as potnom increases above 0, the car does a sudden and strong jerk. When starting the inverter with pinswap 8 in flash and sending “set pinswap 12” immediately after startup, there is no problem and the car drives normal. Starting the inverter with pinswap 12 and sending “set pinswap 12” doesn’t help, the slightest torque request causes a sudden jerk.


johu wrote: Tue Apr 19, 2022 7:00 pm Speaking of random software: viewtopic.php?p=39150#p39150
Thanks for putting this version together. I tried it today with a short test drive but there was no big surprise: idiqsplit=35 felt like the best overall torque. Again, ud quickly maxes out when accelerating and maxes out in the other direction when unwanted regen kicks in.
At 100 (only id) I could do syncofs tuning with my throttle pedal which felt quite nice, should be the standard way 😉. This also showed that while syncofs =17000 resulted in the best torque and lowest unwanted regen, syncofs = 11200 was actually the correct value (32768 offset to the values from the previous post due to hardware sin/cos swap). Setting Idiqsplit <=10 while driving caused no torque at all (inverter also didn’t draw any current). I will play around with this a bit more in the upcoming days.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Cool, thanks very much for testing.
No I remember there was a discussion about these 32768 elsewhere. It seems that my claim that this will compensate for swapped encoder isn't quite right. You might want to look into that direction as well.
That pedal-syncofs-tuning sounds good!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

LeonB wrote: Wed Apr 20, 2022 10:28 pm There also seems to be a bug in the software:
I found the problem(s): First of all, changing pinswap only goes into action after fully restarting the inverter, not only manually stopping and starting it like I have done. Makes sense, probably would do stupid things otherwise. But secondly, this is the code where pwm pinswaps are executed:

Code: Select all

if ((Param::GetInt(Param::pinswap) & SWAP_PWM13) > 0)
   {
      ocChannels[0] = TIM_OC3;
      ocChannels[1] = TIM_OC2;
      ocChannels[2] = TIM_OC1;
   }
   else if ((Param::GetInt(Param::pinswap) & SWAP_PWM23) > 0)
   {
      ocChannels[0] = TIM_OC1;
      ocChannels[1] = TIM_OC3;
      ocChannels[2] = TIM_OC2;
   }
   else
   {
      ocChannels[0] = TIM_OC1;
      ocChannels[1] = TIM_OC2;
      ocChannels[2] = TIM_OC3;
   }
So for e.g. pinswap =12, only the PWM13 swap is carried out, not PWM23.
But as the order of the swaps also results in different end configurations, it’s a bit hard to decide what should actually happen here.


Furthermore, I did some idiqsplit testing: Field weakening was turned off (fwkp/ki=0) and I started with syncadv=0. For a wide idiqsplit range (30 to 80), I cannot feel a difference between different values and overall it feels equal/ slightly worse to MTPA. Again, ud seems to be a limiting factor as it maxes out quickly. Below is a plot of a test run at full throttle and different idiqsplit values (red numbers are the idiqsplit values at that interval):
idiqsplit.png
So for idiqsplit>30, ud just maxes out and uq is also just constant. At idiqsplit=20 ud isn’t maxed out, but the car accepted a bit less power/ had a bit less torque. The ratio id:iq also looks off here, seems to be ~30A:50A and not 20:80.
The unwanted regen remained when running at a low idiqsplit without ud at a maximum. As soon as I let go off the throttle above 3000rpm, ud quickly goes to the maximum positive value.
Increasing syncadv to 35 increased power (from 35A to 70A inverter current) and decreased unwanted regen but also introduced unwanted acceleration at 6000rpm. So just like before with the MTPA formula. Syncadv=25 gets rid of the acceleration but decreases power a bit.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Alright, now following celeron argument about too much current actually decreasing power at the top end, you could try decreasing throtcur. That of course limits torque in the low end but does it yield an increase at the higher end? I'd keep syncadv 0 for now as it's essentially just affecting iqiqsplit as well. Also try bringing field weakening back in for the above test. And thanks for your work. I can chime in once I have my Prius conversion running.

And yes, only one pinswap bit for PWM is possible (and meaningful)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

johu wrote: Sun Apr 24, 2022 8:06 am And thanks for your work.
Thanks to you for coming in here and trying to help. And for making this ev conversion possible in the first place 😉.

I forgot to mention, but I also tried that. I could not replicate celerons experience, less current always resulted in less power. But I had a look into the general idea behind that and will post my findings in the corresponding thread.
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

A short update on the Golf: After trying out many different firmware variants, I am now not using any MTPA formula, but the idiqsplit firmware linked in one of the posts above. I haven’t had luck with any kind of field-weakening controller, but increasing syncadv above any reasonable value always gave me a huge boost in performance. This, however, created problems with self-acceleration and unwanted regen in the upper rpm range.
Being tired of trying to make it work “the right way”, I kept working with a high syncadv and tried to tune away any flaw that came with it. To do so I am now using a field-weakening controller, if you could call it so, that, depending on the speed, adds both Id and Iq. The amount and ratio between the two can be tuned to get rid of any unwanted regen and acceleration. Fast changes in the throttle position still led to a very heavy regen, but that can be fixed with a high (>500) curkp. However, this causes quite a bit of ripple in the currents at low speeds. So additional to curkifrqgain, I introduced curkpfrqgain that gradually increases curkp with speed.
Overall there is progress and I am quite optimistic, although some tuning is still required.


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.
I already mentioned before that inverter temperatures were usually 10°C above the actual ambient temperature. During the last couple of hot days, there were instances where I started the car and the inverter reported temperatures 20°C above the temperature of the batteries which are sitting right next to it. So, while I expected the temperature offset to get better at higher temperatures, it actually got worse.
Thus, I laid my fate in the hands of the Toyota engineers and turned off the temperature derating. I started to increase throtcur and while the reported temperatures quickly maxed out at 100°C, the inverter did not stop. Suddenly I was able to pull twice the amps without any problems. Hence, I will put the inverter into an oven next and try to get a better calibration curve.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by arber333 »

LeonB wrote: Tue Sep 07, 2021 10:48 pm Batteries are now inside the car, HV wiring is done and a coolant system is implemented. The inverter idle temperatures are still a bit high, but a lot better (~10°C above ambient). Temperatures under load are also much better, so the cooling system is helping a lot (who would have thought ;)).
...
Hi

Would you mind sharing your code for JK BMS integration? I am looking of a way to connect CAN info from 5 modules.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

good tests. Can I find source code and parameters somewhere?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

arber333 wrote: Tue Jun 21, 2022 5:05 am Would you mind sharing your code for JK BMS integration? I am looking of a way to connect CAN info from 5 modules.
I have attached the code that I was running on an Arduino Nano with an MCP2515 CAN module. I tried different things there and this is not something to put into a car. It works, but it’s not good regarding the data acquisition from the BMS modules. But you can get all the important CAN messages from there.
I have recently switched away from the JKBMS to the ZEVA BMS. There seems to be different versions of the JKBMS out there and some have a “weaker” CAN signal that drops as soon as there is some noise from the inverter.
johu wrote: Tue Jun 21, 2022 8:22 am Can I find source code and parameters somewhere?
Just pushed my changes here (and accidentally created a pull request on your repo, please ignore ;) ): https://github.com/BraunsCNC/stm32-sine ... fw-control
A bit messy, not optimized and there are a few problems I already noticed, but nothing serious so far.
The optimal values for fwIdMax and fwIqMax, the currents that are added at higher rpms, vary heavily with syncadv but are in the range of 30-80A. I got fwIdStart at 300 (the frequency at which the additional currents are linearly ramped up) and fwIdEnd at 600 (here they reach their Max value).
I added the negQLim parameter which, if set to 1, allows negative uq values in forward direction. Not recommended, ended up in heavy oscillations at high rpm.
Attachments
EGolf_BMSV2.ino
(17.89 KiB) Downloaded 69 times
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by arber333 »

LeonB wrote: Tue Jun 21, 2022 11:33 pm
arber333 wrote: Tue Jun 21, 2022 5:05 am Would you mind sharing your code for JK BMS integration? I am looking of a way to connect CAN info from 5 modules.
I have attached the code that I was running on an Arduino Nano with an MCP2515 CAN module. I tried different things there and this is not something to put into a car. It works, but it’s not good regarding the data acquisition from the BMS modules. But you can get all the important CAN messages from there.
I have recently switched away from the JKBMS to the ZEVA BMS. There seems to be different versions of the JKBMS out there and some have a “weaker” CAN signal that drops as soon as there is some noise from the inverter.
Thanks, i will have a look.
I have noticed JK BMS has a GND line on their CAN connection. Maybe this would require to be connected to a shield sock along the cable?

I did test CAN behaviour with car on, but it was in my garage and CAN cables were comming from the front end to my desk. Thank you for the warning though. I will setup my Canalyst for recording and DUE to just master pool everything together to see if i can get regular 0.5s updates from BMS.
If that passes i will go and try to write some code for ESP32 chip. To be honest that is the only chip that is plentifull in the industry now :).
Also it is highly IOT integrated and this could help with interfacing it.

I see you are using SPI for MCP chip. What do you think about LCD using I2C lines in a car? I have just 2 pins left on my VCU design so i can either fit serial for Nextion display or I2C bus for one 2" OLED. Personally i would prefer OLED because of robustness...
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Thanks, will study it and perhaps merge it since it's on an experimental branch anyway
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

arber333 wrote: Wed Jun 22, 2022 6:48 am I have noticed JK BMS has a GND line on their CAN connection. Maybe this would require to be connected to a shield sock along the cable?
GND on the JKBMS should be connected to the GND of your controller. It may be a differential signal, but high absolute voltage differences between the BMS module and controller could still damage something.
arber333 wrote: Wed Jun 22, 2022 6:48 am I see you are using SPI for MCP chip. What do you think about LCD using I2C lines in a car?
SPI and I2C are both best used on a single board or with rather short wire lengths. There’s no problem using those in a car, but there is a problem running them all the way through a car ;).
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

I did a calibration of the inverter temperature sensor and now MG2 can deliver 400A easily and temperatures keep below 40°C while driving. At temperatures above 100°C, the inverter trips out on its own so the calibration seems about right.

At high syncadv (around 25), the inverter is able to push a lot of power into the motor. However, at some frequency (roughly where fstat*syncadv = 16000), letting go off the throttle results in unwanted acceleration. Hence, I added a ramp that ramps syncadv down starting at some high frequency. This gets rid of the unwanted acceleration, but it also lowers the power. And it also breaks the fwId and fwIq ramps, so they now have three fixed values (start, mid, end) with three corresponding frequencies.

The power loss is not a problem, as at higher rpms MG1 steps into action and supplies ~30kW. Noticeably, MG1 still runs on the original firmware without a problem, albeit field-weakening is disabled.
What is a problem though, is that the fwId and fwIq currents are depending on the battery voltage. Makes sense, as when the voltage decreases and the speed keeps constant, we need a higher fw current to further decrease the voltage generated by the motor. It turned out that ramping fwIq by ~10A is enough to counter any unwanted regen across the voltage range I am currently using (385V-330V).

Overall, this is a quite tuning-intensive process. I am going to post parameters once I am satisfied with the result. I will later push the latest changes of my custom firmware, which is available here:
https://github.com/BraunsCNC/stm32-sine ... ontrol/src
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

wow, the syncadv behaviour is mysterious. Would really like to know what is the value that actually just compensates the delay between current and position measurement to always calculate correct id and iq.

Maybe with your firmware tuned we can synthesize a less tuning-intensive procedure
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by Ev8 »

LeonB wrote: Sat Jul 16, 2022 1:59 pm
At high syncadv (around 25), the inverter is able to push a lot of power into the motor. However, at some frequency (roughly where fstat*syncadv = 16000), letting go off the throttle results in unwanted acceleration.
Interesting I’m currently running low syncadv of 6 (rx400h mg1 &mg2) experience the opposite, letting go of the throttle over a certain rpm results in strong regen until I get down to certain point, I’ll try raising syncadv and see if there’s a point this disappears or becomes unwanted acceleration
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by LeonB »

Today I picked up the Golf at TÜV Göttingen, it is now fully approved :). This meant I could also grab the (good working, but probably not final) parameter files. Those should only be used in conjunction with the custom firmware that you can find here: 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.

Big thanks to everyone contributing to the openinverter project for making this conversion possible!
Attachments
MG2_120822.json
(1.8 KiB) Downloaded 65 times
MG1_120822.json
(1.46 KiB) Downloaded 64 times
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Golf 2 with Prius Gen 3 Motor and Inverter

Post by johu »

Gratulation :)

Very large milestone. Did Ulrich Siebold do the inspection? Where are you located?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply