View Single Post
Old 10-26-2014, 12:03 PM   #1269 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
I fixed what seems like the last major problem with just basic hard acceleration and deceleration, and the PI loop staying on track with IqRef and IdRef. What was happening was,

if (distance(Id,Iq) > MAX_RADIUS), then clamp Vd and Vq.

OK, no problem. But then Vd and Vq were much smaller than they should have been for Id and Iq to track IdRef and IqRef. So, Iq (especially) fell further and further away from IqRef, and would oscillate around 0, causing the slip speed to oscillate. This wouldn't force the motor to change directions, but would make it run rough and slower. At first I was dealing with this by limiting IdRef and IqRef as a function of RPM. That would work OK as long as the ramp rate for IdRef and IqRef to make it back to throttle position was slow enough. But what I tried this morning was this:

I was clamping Vd and Vq using a scale factor. So, it was like this:

VdClamped = scale*Vd
VqClamped = scale*Vq

So that dist(VdClamped,VqClamped) <= MAX_RADIUS.

Id is proportional to Vd, and Iq is proportional to Vq, so why not clamp IdRef and IqRef with the same scale factor?! And then let them ramp up quickly to where they wanted to be. Each time Vd and Vq bump into the ceiling, Id and Iq now can still track IdRef and IqRef.

It works REALLY REALLY well. Hard accelerations, hard decelerations, oh ya, no problems whatsoever. Field weakening happens automatically. No messing around with the actual RPM. I think I have a winner winner chicken dinner.
__________________
kits and boards

Last edited by MPaulHolmes; 10-26-2014 at 12:19 PM..
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
Astro (10-26-2014), e*clipse (10-26-2014)