By hard acceleration I just mean a large step in command of torque doesn't cause any problem anymore. The motor is only rated for 10 amp per phase while Wye connected, and Id and Iq hit their commanded current in around a millisec, and hold it until the RPM is so big that Vd and Vq are no longer possible given the bus voltage, so then IdRef and IqRef are reduced and updated at 10khz so that Vd and Vq continue to bump into their max. I'll definitely build a ramp between the torque command and throttle position. I'm just glad it isn't needed any longer to allow the motor to run properly.
That change will be good for the permanent magnet controller too. The main difference is the "ComputeRotorFluxAngle" function. In the PMSM case, you just read the angle! haha. in the acim case you do an unholy pile of crap. But both motors will run out of voltage, and have Id chase Idref (but IdRef will be zero in PMSM), and IqRef will sometimes have to reduce to allow Iq to converge to IqRef. hmm. and to increase speed, they say do negative Id to fight against the magnets, but that will only be an option when dist(Vd,Vq) < MAX_RADIUS.
I'm going to clean up the code now, and change some things to functions. It will slow it down a bit, but make it more readable. I also changed it to 15MHz, since there is still plenty of time for everything.
Here is my son twisting throttle both directions. this is with 10amp max for Iq and Id, at 72v dc on 480vac motor:son tests out ac controller:
http://youtu.be/1Yr-dkuhzxg