Horrible Tracking Performance

     I'm working on a new robotics project wherein I want to see what level of force- and position-control performance I can get out of an extremely low-cost actuator. By "low-cost" I mean under $100 for everything, motor, transmission, driver, and controller. At this point I'm proud to announce that I have produced the incredibly bad performance shown below. Position tracking is really bad and I haven't even tried force control yet, but this is data from sensor-less motors running on BLDC drivers that I built from scratch.


     My current strategy is to pair ~$50 COTS quadcopter gimbal motors that are wound for high torque and low speed with custom-built integrated power and control electronics that could be produced for <$50. There's only so much torque you can get out of direct drive pancake motors, but it will be more than enough for cosmetic joints, small grippers, or even small arms. The motors I'm using don't have hall effect sensors, so I'm using magnetic encoders to read commutation. I need to automate the commutation identification process, because the commutation sequence I mapped out by hand is a bit off and produces some jerky behavior. I'm also having problems where the motor's magnetic fields interfere with the magnetic encoder at high powers. Not surprising, but I'll need to put some thought into that. Then there's the fact that I'm burning up a lot of MOSFETs, so I need to improve the robustness of my current control loop and gate driving electronics. Then I need to actively cancel out cogging in the motors. Then I need to find a control strategy that works better for motors with no natural damping. Then there are several more problems I can't remember at the moment. But so far, so good. I have plenty of trade-off decisions to make, but currently nothing appears to be insurmountable.