By
Peter C. Jones
and
Scott Tepavich
Senior Project Proposal
Advised by
Dr. T. L. Stewart & Dr. G. Dempsey
A useful control tool to have is one that can adapt to variances in a complex system. One such system is an inverted robot arm, the exact nature of which is not known or can be changed (length, mass, mass distribution, disturbances, et cetera). The goal of the project is to design a learning control system to stabilize the robot arm in the vertical position. The control network will be trained with the adjustment signals used to manually stabilize the robot arm and the resulting robot arm angles. Once trained, the network will stabilize the robot arm without manual input.
Many systems exist whose characteristics are difficult to mathematically model, making the design of an adequate controller a computationally intensive task. A controller that does not depend on exact characteristics but can adapt to differences in the system could eliminate the need for an exact model. An example of this type of system is the motor-driven inverted robot arm: gear-induced time delay, wind and other such disturbances, and mass-distribution differences combine to produce a complex model, needing an even more complex controller. A human, however, can easily manipulate a manual control to keep the robot arm upright. Given that a human cannot always be on hand to balance the robot arm, it would be advantageous to have a controller which can mimic this ease of control.

Figure 1 shows the block diagram with the manual controller connected [1a: learning mode] and disconnected [1b: controlling mode]. The manual controller will convert the person's manipulations into a signal which will drive the robot arm. This will be implemented using a potentiometer connected to appropriate source voltages. In the learning stage [Fig. 1a], the manual controller output will be connected both to the motor (through the gain stage) and to the adaptive learning controller (ALC). After the ALC has been trained, the manual control will be disconnected and the ALC output will be connected through the gain to the motor [Fig. 1b]. The gain is used to boost a signal from a level appropriate for the ALC to the level needed by the motor. This gain can be accomplished through a simple op-amp design. Within the gain stage, there is also circuitry to protect the motor and robot arm from being driven into extreme conditions. This protection circuitry is currently being designed and tested by another project group. The motor drives the robot arm, and a sensor (built into the motor/robot-arm assembly) is used to convert the angle of the arm into a voltage.
The ALC will implement a least-mean-squares (LMS) learning
algorithm on a DSP chip. A parallel time-delayed set of robot arm
angle inputs will be weighted and summed to produce the control signal
needed to move the robot arm toward the stabilized position. During
the learning stage [Fig. 2a], the control signal will not be sent to
the motor; instead, it will be compared to the manual control signal.
The LMS algorithm prescribes a method of changing the weights in the
summers based on the difference between the manual signal and the
network-produced signal. Initially, the weights (whether set randomly
or arbitrarily), and thus the produced signal, will have little
correlation to those values needed to control the motor. As the ALC
adjusts the weights, however, the produced signal will approach the
manual signal. The weighted sums eventually converge on a filter which
converts the arm angle into a control signal. Once trained, the
weight-adjustment algorithm is turned off [Fig. 2b], and the ALC output
is connected to the gain stage leading to the motor and is allowed to
control the system [Fig. 1b].
To correctly implement the LMS algorithm on the DSP, it first needs to be simulated with a tool like MATLAB to make sure that the algorithm is fully understood and works correctly. It is difficult to have a truly manual signal input to MATLAB to teach the algorithm. This can be overcome by creating a simple, traditional controller in MATLAB to act as the manual signal. This controller is derived from a simple two-pole model of the robot arm [Fig. 3a]; using a lead compensator, the system can be stabilized [Fig. 3b]. The output of this controller [Fig. 4] when the robot arm is disturbed is used in the MATLAB simulation as the manual control signal to train the ALC.
![[[Figure 4]]](propfig4.gif)
The learning process for the algorithm begins with a random set of
weights with values between -1.0 and 1.0. The previously recorded and
current arm angles are combined with the weights to produce a
controller signal. This signal is compared to the desired (manual)
signal, and the weights are adjusted according to the difference
according to
Wnew = Wold + 2 * mu * delta * X, (1)
where W is the set of weights, mu is the learning rate (which usually
falls between 0.1 and 1.0), delta is the difference between signals,
and X is the set of arm-angle inputs (starting with the most recent,
and extending back in time as far as the number of weights allows) [1]. Input signals are sent through the system and the
weights are adjusted until the system error drops below some critical
value. In a MATLAB simulation of the learning process [Fig. 5], the
error dropped approximately exponentially with the number of loops
("epochs")--where one epoch is enough time for a given input to cycle
through all of the time-delays. By 20,000 epochs, the
sum-squared-error (the sum of all delta2 for one epoch) had
dropped to 8.08, and by 100,000 epochs, it had reached 1.51, showing
htat the network had been trained [1]. The fact that
the network trained shows that the algorithm used is appropriate for
this project.
[1] Derrick H. Nguyen and Bernard Widrow. "Neural Networks for Self-Learning Control Systems," IEEE Control Systems Magazine, pp. 18-23, April 1990.