Arm Control of a Humanoid Robot
In an effort to provide simple diagnostic tools for ISACís main functions, we began creating a stand-alone control program for ISACís right arm. The ultimate goal of the project is to have a functional program that can monitor the armís movement and control the arm independently of the IMA network structure. A modified PID algorithm is used to regulate the pressure actuator on ISACís arm. A simple learning function is built into the program, so ISACís arm may be tested with a preprogrammed response. The learning function and modified PID algorithm are detailed below.
In ISACís case, the standard PID algorithm provides sufficient control only in a certain range of values. The error (e) between the arm's desired position and actual position is fed back through the PID algorithm. The output of the function is fed directly to the armís pressure actuator as a digital value in the range of 0 to 4095. The standard PID algorithm is as follows:
where Kp, Ki, and Kd are tuned constants discussed later.
This algorithm is not aware of the physical limits that the pressure actuator exhibits. Simply placing a hard limit on the actuator can cause undesired accumulation in the integral term of the equation. This, in turn, leads to prolonged overshoot in the armís step response.
To solve this problem, we added a second error loop to the control scheme. The error between the PID output and the limited actuator output, ea, is integrated and fed back to the PID controller as well. The resulting equation that governs the arm is as follows:
As a result, the equation is now somewhat aware of the actuator limits, and the overshoot is greatly reduced. A hard limit is still needed to force the PID output within an acceptable range, but the effect of this limiting has a much smaller impact with the new equation. Below is an example of one of ISACís joints with and without actuator error feedback. In both cases, the arm was subjected to a 30į step input. Notice that the PID output exceeds the actuator limits for a much shorter time in the modified equation. This leads to a much better response.
After the equation was modified, we tuned each of the gain constants. The very popular Zeigler-Nichols Closed Loop Tuning Method was used for reasons of simplicity. The gain on each term was zeroed out, and then the proportional gain was increased until the system response oscillated in a sinusoidal fashion. The proportional gain at this point (Ku), along with the frequency of the oscillation (Pu), was used to determine each constant based on the following formulas:
This procedure was repeated for each joint.
In general the response of the arm improved. The first two joints reacted slower, but more accurately. The next two joints were improved across the board. The final joints, unfortunately, could not be improved much at all.
After the armís response was tuned, a simple learning function was implemented. The arm encoders are written to an output file at a regular frequency. The best sample time we could manage with the given system was 40 ms. This recorded response can be commanded from the computer, or a person can move the arm while the muscles are not biased.
A recorded file can be fed back through the PID controller as an input, thus replaying the response. Below is a graph of a recorded response. You can see that the response is delayed in time, but fairly accurate. The response tends not to react to quick changes in the recorded path, which in some circumstances can actually be a desired characteristic.