Page 3 of 4
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 9:31 am
by Romale
johu wrote: ↑Mon Mar 24, 2025 7:14 pm
8) yes a more or less known limitation. If syncadv doesn't solve it I have no idea
The syncadv parameter is set for each of its units of value by how many units will the syncofs parameter change? will it change for the better or for the less?
when I increase the syncofs value by 1500, acceleration becomes controllable when moving forward, but it gets out of control earlier when moving backward. if the syncofs is reduced, then on the contrary, control returns for backward movement, but earlier it is lost when moving forward.
if reducing the syncadv will shift the angle of the syncofs towards an increase in the chosen direction of movement, then yes, this can definitely solve this problem.
you just need to know the ratio, by how many units does the syncofs change from the syncadv change?
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 9:37 am
by johu
The formula is
Code: Select all
advancedAngle = angle + dir * syncadv * frq
So syncadv=10 means at 100 Hz syncofs is shifted by 1000 digits in the direction of rotation. With what you observe it should rather be 15 then?
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 10:57 am
by Romale
This is valuable information!
I'll definitely check it out.
yes, it is likely that the correct syncadv will be 15
is it equal for every 100 hz? (200 hz = offset by 2000?) or once when a given frequency is reached?
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 12:07 pm
by johu
It is linear with frequency
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 12:58 pm
by Romale
so. the correct syncofs was 600.
when the fwcurmax is -210, the motor does not stop (syncadv = 10), setting the syncofs to 1100 stops the motor perfectly at syncadv 10
. next, I returned the syncofs to the correct 600 units, and syncadv = 15. the motor did not stop. I increased by 5 and then by 10 units, and only at syncadv = 100 did the motor start to stop!!! this is probably a very big offset.
for understanding: the battery voltage in this experiment is 45 volts, the load on the motor shaft is 0 (gearbox only)
. I conducted the experiments on an electric motorcycle that I am currently building with a rear Outlander motor and a Honda ima inverter.
Re: Inverter Firmware 5.35.R
Posted: Tue Mar 25, 2025 1:07 pm
by Romale
I think it's worth checking the change in the syncadv parameter in the countryside on a forest road without people and cars, under load.
but it won't be soon. The weather doesn't allow it yet.
When I check it, I will definitely give you feedback.
Re: Inverter Firmware 5.35.R
Posted: Wed Mar 26, 2025 12:03 am
by P.S.Mangelsdorf
johu wrote: ↑Mon Mar 24, 2025 11:18 am
Well you could try pinswap=PWMOutput13 but you'd also have to physically swap encoder A/B channel
Doing that solved it, thank you!
Re: Inverter Firmware 5.35.R
Posted: Wed Mar 26, 2025 7:04 am
by johu
Thats great! So I guess I will pre-program that as it seems that way around for most drive units
Re: Inverter Firmware 5.35.R
Posted: Wed Mar 26, 2025 11:55 am
by P.S.Mangelsdorf
johu wrote: ↑Wed Mar 26, 2025 7:04 am
Thats great! So I guess I will pre-program that as it seems that way around for most drive units
Yeah, and I'm almost certain I had previously had to swap AB to get it running, so basically I just swapped them back to stock.
Re: Inverter Firmware 5.35.R
Posted: Mon Mar 31, 2025 12:48 pm
by johu
Romale wrote: ↑Tue Mar 25, 2025 12:58 pm
when the fwcurmax is -210, the motor does not stop (syncadv = 10), setting the syncofs to 1100 stops the motor perfectly at syncadv 10
. next, I returned the syncofs to the correct 600 units, and syncadv = 15. the motor did not stop. I increased by 5 and then by 10 units, and only at syncadv = 100 did the motor start to stop!!! this is probably a very big offset.
I just thought of the difference between a static syncofs offset and the dynamic syncadv: syncofs is applied to both forward and backward Clarke tranformation wheres syncadv is only applied to backward transformation.
Makes me wonder should I maybe apply syncadv to forward Clarke and 2*syncadv to backward Clarke?
Re: Inverter Firmware 5.35.R
Posted: Mon Mar 31, 2025 3:14 pm
by Romale
johu wrote: ↑Mon Mar 31, 2025 12:48 pm
I just thought of the difference between a static syncofs offset and the dynamic syncadv: syncofs is applied to both forward and backward Clarke tranformation wheres syncadv is only applied to backward transformation.
Makes me wonder should I maybe apply syncadv to forward Clarke and 2*syncadv to backward Clarke?
if the syncadv parameter does exactly the same thing as syncofs, but precisely in the current direction of movement, then this will forever solve the problem of uncontrolled acceleration!!
Re: Inverter Firmware 5.35.R
Posted: Mon Mar 31, 2025 3:17 pm
by Romale
I am ashamed, but I am not familiar with Clark))
however, I am absolutely sure that if every 1 syncadv shifts the real syncofs by 100 values, then with a syncadv value of 20 we are guaranteed to permanently solve the problem of loss of control.
Re: Inverter Firmware 5.35.R
Posted: Mon Mar 31, 2025 7:43 pm
by Zieg
Sorry, does this bit of control theory apply to induction only, or pmsm as well? I've been playing with syncadv on my leaf motor too, not sure if this discussion applies to it though.
Re: Inverter Firmware 5.35.R
Posted: Mon Mar 31, 2025 8:28 pm
by Romale
Zieg wrote: ↑Mon Mar 31, 2025 7:43 pm
, ...or pmsm as well? ...
It's about pmsm (foc)
Re: Inverter Firmware 5.35.R
Posted: Wed Apr 02, 2025 8:32 am
by johu
Here is a test where syncadv is applied for forward transform and applied 2x for backward transform. I'm too afraid to test it with full 400V
https://github.com/jsphuebner/stm32-sin ... 4215111311
Re: Inverter Firmware 5.35.R
Posted: Wed Apr 02, 2025 10:41 am
by Romale
I don't have any projects with 400 volts right now.
only 130 volts are at hand, but I will definitely check!
Re: Inverter Firmware 5.35.R
Posted: Wed Apr 02, 2025 10:45 am
by Romale
it is not possible to download the .bin file
Re: Inverter Firmware 5.35.R
Posted: Wed Apr 02, 2025 12:20 pm
by johu
You need to log in to github
Re: Inverter Firmware 5.35.R
Posted: Thu Apr 03, 2025 2:54 pm
by Romale
I was able to check so far at low voltage, but even now, with syncadv = 10 and fwcurmax = -210, I accelerated the motor more than twice from the base speed and it is super stable, lowering the throttle position is incredibly smooth, like never before!!!
special thanks for the high charging current !!!!
I think it's a victory.
in the coming days, I will test this on a car with a 300 volt system.
Base speed:
accelerated speed:
Re: Inverter Firmware 5.35.R
Posted: Thu Apr 03, 2025 3:05 pm
by johu
Wow, that is super cool!
I might test myself this weekend
Re: Inverter Firmware 5.35.R
Posted: Thu Apr 03, 2025 4:39 pm
by Zieg
So is the net effect more power in field weakening? One thing I'm still a bit worried about was that at higher speeds (I think about 8000 rpm on a Leaf motor) I was still getting occasional unwanted acceleration. Changing the syncadv seemed to help, but now anything that has to do with syncadv makes me wary, haha.
Re: Inverter Firmware 5.35.R
Posted: Thu Apr 03, 2025 4:46 pm
by Romale
Zieg wrote: ↑Thu Apr 03, 2025 4:39 pm
So is the net effect more power in field weakening? One thing I'm still a bit worried about was that at higher speeds (I think about 8000 rpm on a Leaf motor) I was still getting occasional unwanted acceleration. Changing the syncadv seemed to help, but now anything that has to do with syncadv makes me wary, haha.
I don't know about the power, but the stability has definitely improved. I think this new change will eliminate unwanted acceleration altogether.
Re: Inverter Firmware 5.35.R
Posted: Thu Apr 03, 2025 6:21 pm
by Zieg
Is that how the Clarke transformation functions? I'm not sure what's being calculated there. I did notice that more syncadv caused the unwanted acceleration to happen at lower speeds.
Re: Inverter Firmware 5.35.R
Posted: Sun Apr 06, 2025 7:08 pm
by Zieg
Actually thinking about it a bit more, is the backward transformation used for regen or coasting? I ask because I've dialed my syncadv back to 6 and still get unwanted acceleration at highway speed. It's odd though, it only happens when I am WOT and then snap my foot off the pedal. I have a bit of off throttle regen but not a lot. The effect is that I stop accelerating when I snap my foot back, then an instant later the car starts accelerating again. I have to press the brakes HARD until it suddenly stops trying to accelerate - like a switch being flipped. Wondering if this change might solve that problem. As it stands I don't want ti race the car for fear of it happening on track.
Re: Inverter Firmware 5.35.R
Posted: Sun Apr 06, 2025 7:52 pm
by johu
Forward and backward transformation are constantly run, no matter of the operating mode or torque direction.
Which firmware are you testing with? At which motor rpm do you loose control?