suggestions for the next release 5.13 -> 5.14

Post Reply
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

suggestions for the next release 5.13 -> 5.14

Post by Zapatero »

As getting close to the OEM-Feeling i would like to suggest some changes for the next release. But maybe it's just me that's having the need for the oem feeling ;) anyways, here we go:

***
when accelerating i can use the throtramp to set how sensitive my pedal should react. But that's only true for how fast i push the pedal.
When i let go of the pedal quickly it feels very rough. If the ramp is active here, too, then it had to be like 4 times stonger than when you push the pedal.

***
Regeneration is still a big issue for me. It's non consistent and i'd like to have it more steady. Also when i rev the car up to 7000 rpm and let go of the pedal quickly it starts a full power regen until it reaches about 4300 rpm and then goes back to the regen it was set to.
@ Johannes: Can i send you some log files of this to work this out? Which parameter should i log with wich interval setting?

***
Starting off at low RPM i still have a minor shaking. Also it feels like some power is still missing in this rpm range?

***
i would love to see idcmin and idcmax values mappable through the GUI instead of text based as i think at least idcmax is actually a feature everyone should use for safety reasons

***
The new field weakening feature is awesome - i run my car at throtcur set to 7 and now it pulls strong up to 8000 rpm. Still im a bit scared of revving it all the way up because of the strange behaviour of sudden very strong regen as described above. Alltough throtcur 7 seems to be the maximum for the Leaf inverter as throtcur 8 leads to desats for sure!


***
Version Info 5.11 still shows up in my inverter allthough i've installed 5.12
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by johu »

Yes that's some good suggestions. Still have to fix the regen bug that arber found in the sine version.
Can you log id, iq, ifw and fstat during the unwanted regen? Just post the file here. Just use the data logger, not the plot.

Yes, there is no downramp when coming off the throttle, only when going below 0 to regen. Can ramp down at the same speed that I ramp up throttle.
i would love to see idcmin and idcmax values mappable through the GUI instead of text based as i think at least idcmax is actually a feature everyone should use for safety reasons
Yes, will add that to the reworked web interface https://github.com/chrskly/esp8266-web- ... /ui-rework
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: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by johu »

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by Zapatero »

johu wrote: Tue Oct 12, 2021 8:55 am viewtopic.php?f=7&t=1971&p=32382
Are the new files attached already the V5.13? Sorry this confused me :?: ;)
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by celeron55 »

My current theory is the sudden very strong regen at high rpm happens in the field weakening region when no id is applied. This causes so much generated voltage that it gets rectified by the igbt diodes into the battery. It stops when you press enough throttle, because then enough id gets applied to weaken the field again.

I could be grossly wrong.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by johu »

Zapatero wrote: Tue Oct 12, 2021 11:34 am Are the new files attached already the V5.13? Sorry this confused me :?: ;)
yes
celeron55 wrote: Tue Oct 12, 2021 12:30 pm My current theory is the sudden very strong regen at high rpm happens in the field weakening region when no id is applied. This causes so much generated voltage that it gets rectified by the igbt diodes into the battery. It stops when you press enough throttle, because then enough id gets applied to weaken the field again.

I could be grossly wrong.
Yes it feels like it. I thought the fw controller would see this as too much iq and then counteract. But well. That's why logs would be nice.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by Zapatero »

I testet the trothramp when letting go of the pedal:

For me it looks like Offpedal-Ramp is inverted to Onpedal-Ramp, that means throtramp is set to 1 then Onpedal-Ramp is very active and acceleration kicks in slowly but Offpedal-Ramp is not active at all. If i set throtramp to 15 Onpedal-Ramp is very little active and Offpedal-Ramp is very strong. To be honest, for me this feels perfect now. But i don't think that's what most people want to feel - agressive acceleration and a soft release? For me the ramp reduces a lot of noises when letting go of the pedal. Still i don't think 2 ramps inverted to each other was the idea? But my observations could be totally wrong, of course!

Honestly i think for proper tuning this should be 2 seperate values, so it can be properly adapted to every build. For my RWD build there has to be a stonger offpedal-ramp as the tension has to get out of the propshaft to the rear wheels slowly, otherwise there is a big clunking noise. I guess this won't be the case for FWD builds.

Logs for the sudden regeneration follow up the next 2 hours.

@ Johannes: Thanks for addressing these issues, the car feels so much more stock than before!
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.12 -> 5.13

Post by Zapatero »

Here's the log file. It was quite tricky to pull the log as everytime i started to log the connection to the inverter got lost. I had to restart it to gain a connection again. With a higher sample rate it happened even more drastically. So i set the sample rate to 500 and included min and max values. Maybe someone got an idea why i keep loosing the connection when pulling logs?

But anyways, here's the best log that i could get for now!
Attachments
log_suddenregen.csv
(5.52 KiB) Downloaded 130 times
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by johu »

The log file is indeed surprising, despite being a little coarse. The unwanted regen starts in line 15 where frequency drops from 480 to 400 Hz in just 1 second. It then keeps dropping to 314 Hz within another 4 seconds.
In that time iq hovers around -70A so the strong regen current certainly doesn't show as iq. And therefor the FW controller has nothing to work against. But also id isn't very high either, just -43 A average. So the strong current doesn't show up either on iq or id. How is that possible? Even diode conduction should show up.

The process repeats starting in line 29. There we can also see that fw current is commanded to 0.
In all your braveness, can you check how syncadv affects this? Try setting to 15 or so.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by Zapatero »

Here are 2 more logs:
First run with syncadv 18. Problem is very strong here BUT the car runs VERY powerful
Second run with syncadv 5. Problem doesn't occur at all, but the car is sluggish as hell. No power at all in field weakening.
The run i posted above is with syncadv 12, what i run all the time at the moment. But i'm tending to syncadv 15 but the sudden regen is scary!


Also i discovered when i let go of the accelerator slowly it doesnt occur, just if i get of the pedal quickly!
Attachments
Sudden_Regen_syncadv5.csv
(11.64 KiB) Downloaded 119 times
Sudden_Regen_Syncadv18.csv
(12.3 KiB) Downloaded 126 times
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by Zapatero »

Just for completion: here's my recent json file with the parameters
params.json
(1.28 KiB) Downloaded 172 times
Syncadv set to 15, keeping it like this at the moment, it's fun :x
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by Zapatero »

Zapatero wrote: Wed Oct 13, 2021 11:05 am Just for completion: here's my recent json fine with the params.jsonparameters

Syncadv set to 15, keeping it like this at the moment, it's fun :x
Unfortunately that doesn't work as if you have a high synadvance the accelerator gets a weird behaviour: In the field weakening range it reacts barely if you push it until a certain very late point, then it fully accelerates. Thats how i broke my last motor - i wasn't aware of this problem (paired with a testing firmware with no rpm limiter)
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by johu »

More test driving today. Problems to be tracked down
  1. Way too much regen above 4000 rpm. When requesting strong regen you got like 3x what you wanted. Worse at higher speed
  2. Painful stuttering when requesting regen above 4500 rpm
  3. Painful shock when transitioning from acceleration to regen above 5000 rpm
Good news: I have solved the first two :) The second was caused by first. The first was caused by a change I made a while ago: limiting the maximum positive output of the d-controller to half the available amplitude. So in plots I could clearly see ud transitioning positive when going into regen and then eventually bumping into the wall when it hit that output limit. Then very strong regen would kick in, lowering motor speed very quickly. That in combination with curkifrqgain caused the painful stuttering.

I also tried to drive with curkifrqgain=0 and that also works well. With curki=5000 the car becomes sluggish at higher rpm but with curki=15000 it is quite lively again. Maybe even more is good. One speed dependence eliminated, I don't mind.

As for the shock I haven't found a solution yet besides slowly coming off throttle at high rpm, if traffic permits.
Attachments
stm32_foc.bin
(46.41 KiB) Downloaded 119 times
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: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: suggestions for the next release 5.13 -> 5.14

Post by johu »

Problem 3 now also kind of solved. I correctly implemented the downramp for throttle but most of all the last 3% are ramped with regenramp.

So say you set throtramp to 10%/10ms and regenramp to 0.5%/10ms then the fall from 100% to 3% would happen in 97ms and from 3% to 0% in 60ms. Hmm theoretically, now that I'm writing this I realize the loop resolution is 10ms.

Anyway, even with that the painful shock when quickly coming off throttle is now completely gone. But still, above roughly 6000 rpm there is still the strong unwanted regen. So strong that it blocked the front wheels on a relatively dry road! I have caught that with a plot. Thankfully the hardware trips out and stops the regen mayhem.

During the test drive I had completely disabled regen, so it's pure "phantom" braking. At least the plot now shows what I expected: excessive negative q-current of -550A (0A is control target!). The FW controller tried to counteract by commanding -280A field weakening current on top of the MTPA current. Indeed id reaches -400A but apparently that is not helpful. Remembering that mystery post that was deleted after a few hours, too much id might actually no longer result in field weakening.

fwkp was at -300.

The idea is: if I slowly come off throttle all is good. That's what I want to mimic.
Attachments
stm32_foc.hex
(132.33 KiB) Downloaded 95 times
stm32_foc.bin
(47.03 KiB) Downloaded 102 times
regen unwanted.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply