View Single Post
10-14-2014, 12:53 PM   #1201 (permalink)
thingstodo
Master EcoModder

Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
 Originally Posted by MPaulHolmes Yes! Well, what I have been doing is, when there is a gross violation of the clamping (VdClamped - Vd) > 100, knock down the commanded Id by 100. As if giving it another chance, allow the "commanded" current crawl back very slowly to the ACTUAL commanded current. If there's another violation of Vd or Vq, tar whoop them again! The process needs to be cleaned up, but that has worked best. Another way is, I think I need to find the relationship between Id, Iq and RPM and load for all possible values (for a given AC voltage). Because that wouls be difficult, I'm trying to be content with only using Vd, Vq, Id, and Iq, since I have those.
Did you get the code posted to the WIKI?

Please excuse my thinking-while-typing style. I don't think that this method is any better than what you have already, except maybe using a variable instead of a constant 100 for subtracting from Id?

- would it make sense to clamp by limiting the PI output? I dislike having variables calculated in more than one location, but that's all I could think of.

Note really a quote, but I wanted it indented

Quote:
 ShouldBeClamped = Kp*error + Ki*sumOfErrors; if (ShouldBeClamped)>VdClamped /* this is too high, limit { sumOfErrors=(Vbus-(Kp*error))/Ki; /* calculate sumOfErrors Id = Id - IdLimit; /* change Id so it can ramp up again /* next time around } newVd = Kp*error + Ki*sumOfErrors.
How I think it works:

knocking down Id by 100 limits sumOfErrors
so the calculated Vd is lower
that's how you reset the I term of th PI loop, allowing it to ramp up again

But it's still bouncing off the high limit, and it still affects Vq. Unless your VdClamped leaves some headroom for Vq so the vector sum does not affect Vq very much.

I just added a variable instead of subtracting 100 from Id. Does this do the same thing you are doing already?

 The Following User Says Thank You to thingstodo For This Useful Post: MPaulHolmes (10-14-2014)