Friday, October 16, 2009

Lab 3 - Motor controllers

PID

In addition to simple proportional control, we also were able to implement a full PID controller. For the I and D components of the PID controller we were forced to numerically differentiate and integrate the Hall effect sensor reading. Differentiation was done by computing the difference between successive sensor readings divided by the time period between them and integration was done by adding the current position error multiplied by a time interval to a running sum of the cumulative error. It turned out that the integral was far more stable that the derivative control due to the noise in the Hall effect. The integral controller also had the benefit of removing steady-state error in the arm position, but did have the disadvantage of a much slower response time, especially when a significant amount of error had accumulated, as can be seen in the video below.




Detent

The detent controller was designed to simulate a hard stop in the arm movement that could be passed over with enough force, similar to plucking a taut string. To implement this, we specified a small region in the center of the motor's workspace where a large torque was exerted away from the center. This was a simple discontinuous function that jumped to a high value in the detent region and was zero everywhere else. The net effect was a force strong enough to push back the arm unless a large external torque was applied, allowing the arm to "jump" over the detent and return to equilbrium on the other side of the workspace.


No comments:

Post a Comment