Hey Matt, fixed a couple mistakes on the code chunk. I'm going to test parts of it in the simulator when I get back from school. Dang I'm late! Then I'm going to pulse the throttle from 4 amps to 50 amps to 4 amps to 50 amps...etc..., while the rotor is locked (emergency brake). I'll be pulsing it 4 times a second, and then I'll gradually turn up the P (with I starting at 0). The oscilloscope should be able to lock on to that signal, so I can watch if there is overshoot. Then I'll back off the P a little, and gradually increase the I, doing the same thing. So my loop will keep chasing 50 amps, and then turn around and come after the 4 amps. I picked 4 amps instead of 0 because 0 is a special case (ben hurtling down the street to his death).
|