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.
Last edited by MPaulHolmes; 10-26-2014 at 01:19 PM..
|