I'm trying to control a BLDC motor with a dsp. To do this, I'm using three loops: Position, Velocity, and Current (Torque). I have had some succes with the Velocity loop, but i am having trouble with the other two loops. If anyone has an algorith for the current or position loop, i would really...