GUSTAVO NUNES GORETKIN


Motor Control

Motor control is a crucial application in robotics. I've been using the NXT motor as a cheap high-res encoder-motor-gearbox combination. The encoder provides quadrature output with 720 transitions per revolution of the motor output shaft.

Trajectory Generator

The trajectory generator produces a series of points designating at what position the motor should be. It has no knowledge of the actual shaft position. The output of the trajectory generator is fed into the PID controller which then ensures that the motor is at the desired position. In this manner, the acceleration and velocity of the motor shaft can be specified. The true velocity and acceleration, though, depend on the load on the motor, and the PID control.

Update!I implemented the trajectory generator on a dsPIC specific for motor control tasks with built-in quadrature decoders (and a bundle of other peripherals). There are no position errors now.

Please Download Flash Player

The video below showcases the trajectory generator I've implemented. It's running on an ATMega 32 and unfortunately the microcontroller does not count every single encoder tick (it cannot service the external interrupts quickly enough) so the position control is not so great right now. You can still notice the other features.

Maintaining a Constant Velocity by Applying Variable Torque

In this video you can see how the system controls the velocity of the output shaft. The output torque and the torque provided from the moment arm (and friciton, etc.) have to balance each other out in order to maintain constant velocity. The moment arm provides torque proportional to the sin of the angle of the moment arm, so the system must constantly compensate. At the 12-o'-clock position, the arm falls rapidly for a moment, but this is because of the back-lash in the gearing of the motor