Page 1 of 1

New test feature REPLACES manual mode in FOC from 5.27.R

Posted: Tue Nov 22, 2022 8:36 pm
by johu
I was kind of sick of the manual mode not working so now I have replaced it with something different: manualstart

There is a new parameter in the testing section called that. It is equivalent to triggering the start pin.

It just puts inverter into regular run mode which means the usual criteria must be met and it also means it will pull in your DC contactor.

The value of manualid and manualiq is now ALWAYS added to the throttle input, the MTPA spread or field weakening current. In normal operation it shouldn't make a difference as these parameters are not stored and always initialize to 0.

But now you can test things like injecting negative id to find your characteristic current and such.

Re: New test feature

Posted: Mon Nov 28, 2022 12:47 pm
by Bigpie
Don't suppose you could give an overview of how this can be used to workout the critical current/flux linkage?

Re: New test feature

Posted: Mon Nov 28, 2022 2:45 pm
by johu
here's what I did: https://openinverter.org/forum/viewtopi ... ing#p47564

In the 5.25 release from above you'd use "manualid" (negative value!) in run mode to inject field opposing current and then coast down a hill with regen turned completely off. At some value of manualid you will find uq no longer rises with increasing frequency - you have found critical current.

Re: New test feature

Posted: Mon Nov 28, 2022 3:49 pm
by Bigpie
So go to top of hill with 5.25R, set fwmargin to 10000, stick a negative value in manualid and roll down the hill. If uq rises with with the car speed, change manual id and repeat?

Re: New test feature

Posted: Mon Nov 28, 2022 3:50 pm
by Pete9008
A word of caution here. On a high inductance low speed motor like the Prius this approach will work well, however, on lower inductance motors like the Outlander it could well be problematic.

The calculations here https://openinverter.org/forum/viewt ... 09#p48609 gave a flux linkage of 27mWb for your motor and and with your measured inductance of 0.1mH this would give a critical current of 270A. 27mWb does seem a bit low, say it was actually 50mWb then the critical current could be 500A. I've not got any practical experience here but driving around with this much manual Id doesn't seem a great idea :o

Have you had any trouble with unwanted regen or acceleration on yours? If not then I'd be tempted to just assume a critical current of around 300A to start with and see how you get on.

The other option is to do the coasting test at a number of different lower Id values and then extrapolate the results to get to the critical current.

Edit - doesn't have to be a hill, just coasting should work too. The hill just means you don't have to accelerate up to speed first!

Edit2 - when I originally suggested this test it was intended more as a one off to validate our understanding of high inductance motors, I never intended for it to become part of a routine setup! Finding flux linkage, measuring Ld and calculating from those is a much simpler, and safer, approach.

Re: New test feature

Posted: Mon Nov 28, 2022 4:00 pm
by Bigpie
pete9008 wrote: Were iq, id and vq all zero when you took the measurement?


I wasn't sure about this during the logs, also just trying to ascertain a repeatable method for me and other's to follow when moving to this firmware version. As idiot proof as possible :D


@johu, BTW there's no 5.25R tag on the repo.

*EDIT* So we need a defined way of calculating flux linkage, at least for the first person to use a particular motor, and that be documented, and the critical current can be calculated from there.

Re: New test feature

Posted: Mon Nov 28, 2022 4:27 pm
by Pete9008
Correct.

If you are coasting (no throttle or regen, torque request of zero) then iq and id will be zero. If syncofs and syncadv are correct then vd will also be zero and only vq will be non zero (oops, sorry looks like I mistyped in the text quoted above).

So if you are coasting and vd is zero you can use the value of vq to calculate flux linkage.

If vd isn't zero then syncadv or syncofs are out, vq is coupling into vd and so any measurement/calculation based on vq would be wrong. Vd being zero is mostly a sanity check on the sync setup.

Ill try to put something together with a bit more detail on how to do this.

Tbh the critical current is not as critical on lower inductance motors!

Edit - where was that quote from, I ought to fix it to avoid future confusion!