Oh man, testing is getting close now!
In practice with the DC controller, the hardware overcurrent protection never comes on, because the PI loop has been tuned nicely, so that the current chases the throttle position. And max throttle is set to 500 amps (well 505) in software with zero current overshoot. If there were overshoot, the LEM response time would be between 1 us and less than 5us, depending on the severity of the current jump. There's also a low pass filter before the hardware overcurrent, which has an RC time constant of something like 1/50000 sec I think. I'll have to check that because I forgot what R and C I used. The nice thing is, you could eliminate that, or make it as fast as you want. The rest of the hardware overcurrent circuit is very quick. Just a couple nand gates, which have response times of a few nanoseconds.
In the case of the AC or PMSM, it's looking at each of the 3 phases, and if any one of them goes out of bounds, all the pwm channels are disabled until the naughtiness has ceased. I believe the response time will be similar. Also, I think that hardware overcurrent won't be very necessary once the field oriented control gets working nicely, because then it's basically just like a DC controller. I_field chases zero (hurray for permanent magnets), and I_torque chases throttle position, just like the DC good old days. Well, there's field weakening that you can add, where you set I_field negative to fight against the magnets to spin it faster.
So, Less than 5 uS if there's no low pass filter before the hardware overcurrent part.
I forgot that there was even wiki code. I have no idea how recent it is. I have some code on my computer that runs the AC controller with the V/Hz = constant (actually, V = constant because I had such low voltage testing). I'll upload it again once I do a little testing.
I've never done any PIC programming. Only atmega8 and atmega168, and then dsPIC30F. It was truly annoying to get everything initialized with the dsPIC, but once all the bits are set, it's just C and everything is the same, so it's not bad. And the dsPIC is pure motor control. Everything you want a microcontroller to do for running a motor, it does naturally.
Last edited by MPaulHolmes; 12-30-2010 at 03:02 PM..
|