FREEDOM .DEG

Degrees of freedom

Unedited posts from archives of CSG-L (see INTROCSG.NET):

Date: Wed Jan 20, 1993 9:50 am PST

Subject: Degrees of Freedom

[From Chris Malcolm]

Rick Marken writes: >Chris Malcolm -->Powerssaid:

>> Have you actually seen Little Man Version 2? It controls an armwith 3 degrees of freedom without computing inverse anythings.

> You reply:

>> 3 degrees is trivially easy to do almost any way you like. It'sthe last two degrees of freedom (5 & 6) that create the computationaldifficulties.

> So can we expect the PCT revolution to begin when the Little Man alsocontrols the roll (4) pitch (5) and yaw (6) of a baton held in his hand? Iwould guess that after all the work to program these changes (the main workbeing simulation of environment; the torques of the baton and whatnot) the AI,robotics, and motor control community would look at it and say "yeah, but yourdoing it with a little man; most baton twirlers are girls". This critique is ascogent (and misses the point as grossly) as does the observation that only 3 dfare controlled in the current demo.

I agree. But the kind of engineering types who build industrial robotcontrollers are not going to even bother examining the detail of anydemonstration of a supposedly better way of controlling robots which onlyhandles 3 DoF, since they know that 3 DoF can be done very computationallycheaply by a great variety of methods which fail horribly with 6 DoF, andstudents keep coming up to them with very wonderful methods which work a treatin 3 DoF and bog down horribly in 6. "Very interesting, come back and show meit handling 6 DoF, and then I'll be interested enough to bother trying tounderstand it" is the standard response.

Chris Malcolm

Date: Wed Jan 20, 1993 11:49 am PST

Subject: Robotics and degrees of freedom

[From Bill Powers (930120.1130)] Chris Malcolm (930120) --

Chris, could you explain just what the problem with 6 (or 7) degrees offreedom is as seen in conventional robotics? Without actually extending theLittle Man to that degree of complexity I can't come up with a demonstrationjust now, but in my naivete it doesn't strike me as particularly difficult. I'msure there are some problems, but without actually trying it I can't guess whatthey are.

Suppose we were trying just to position a fingertip on a hand which swivelsin two dimensions at the wrist, the wrist mounted on a rotatable forearm, theforearm bending at the elbow, and the upper arm swinging in x and y and alsorotating. That seems to come out to 7 degrees of freedom.

Positioning the fingertip in space (as visually perceived) uses up onlythree degrees of freedom, so there are four degrees left unspecified. The(visual) feedback signals representing x,y, and z error would be compared withreference signals, and the error signals would be distributed among thereference signals operating the 7 degrees of freedom of the arm. Therequirement for the distribution is that a small perturbation in x shouldcontribute (through each possible path) to an opposing net effect on the fingerin the x direction, and the same for y and z. The actual effects don't have tobe exactly opposed to the perturbation, as long as they have a component thatis opposed to it. In this way the three errors would be corrected. Theremaining degrees of freedom being unspecified, the arm would end up in somearbitrary configuration, but the fingertip would be in the specifiedposition.

If the orientation of the hand were also to be controlled, there would bethree more perceptual variables representing the hand in terms of rotationabout the x, y, and z axes in space. Again, we could derive three errorsignals, which contribute to all seven degrees of freedom in the way requiredfor net negative feedback about the three axes of rotation. This will use upthree more degrees of freedom, leaving one degree unspecified.

Mechanical limits on position and rotation would introduce interactions sothat when one control system reached a limit, the reference signals for otherswould automatically adjust through normal feedback action.

I realize that this picture involves a great deal of abracadabra, and Iknow that my intuition is far from infallible. I'm just trying to sketch in howI'd approach the problem in PCT terms without anticipating any problems.

The other approach, I can see, would be very complex. If you picked a finalconfiguration of the arm, to know how to get the arm to that configuration fromsome other configuration by varying joint angles you'd have to solve for theinverse of the kinematic equations, and then devise a signal-generatorthat would produce just the signal waveforms that would accomplish the move.You'd have to avoid signal combinations that would exceed limits or passthrough forbidden regions, and so forth.

With the PCT approach you don't have to compute any inverse relationships.Only forward computations are involved. From the current joint angles, youcompute the current states of the variables to be controlled. You compare thosestates with the corresponding desired states, and convert the error intochanges in joint angles that will make the error smaller. In simplerapplications, what happens is that the systems acting together simply find apath from any initial configuration to the desired final configuration.Actually I've done this with as many as 50 controlled variables, admittedlywithout any complex environmental constraints to make the job harder.

If this straightforward approach fails, there is still a way out. Byconstructing intermediate control systems handling only a subset of the degreesof freedom, control can be established in an intermediate space where theoriginal degrees of freedom are transformed into a more tractable set. In aminor way this is what I did with the Arm demo, by combining vertical controlof the two arm segments into a single radial direction of control and acontrolled vertical rotation in phi. Having done that, relating the visualerror signals to changes in reference signals for the kinesthetic systemsbecame relatively simple, with no ambiguities.

The impression of current robotics approaches that I have gathered is thatthe problem is thought of as producing a particular outcome by finding a set ofinputs that will produce it. This necessarily involves working backward fromthe desired outcome to the inputs through the inverse of the relationships thatturn inputs into outputs.

My approach, the PCT-styleapproach, is much more permissive. There isn't any attempt to specify the pathby which the system gets from one state to another. Instead, we begin with thecurrent state of the variables and their differences from the desired states.The error is then transformed into, or mapped into, a vector that, when addedto the current state vector, makes the error vector smaller during one time-increment.If the error always gets smaller, the inevitable result is that the actualstate vector will become equal to the desired one.

The path by which this result is accomplished may not be an ideal one, butin all cases I have looked at (simpler cases) such a result does come about,and not by any outrageous or prima facie undesirable paths. This makes sense ifyou assume that the human systems work the same way. We judge thereasonableness of the paths, after all, by comparing them with the way the realsystem works. If the real system doesn't precompute paths, but takes whateverresults from the simultaneous actions of the control systems, then anartificial system that works the same way will move in ways that look perfectly"natural."

Best, Bill P.

Date: Wed Jan 20, 1993 12:17 pm PST

Subject: Re: Robotics and degrees of freedom

[From John Gardner (930120.1400) to: B. Powers and Chris Malcom

Perhaps I can help clear up the mis-understanding. I consider myself to be one of those "engineering types who make robotcontrollers" and I think I see the misunderstanding here. I agree with ChrisMalcom-whatworks in 3 DOF may not help much at all in 6 dof.

I think the root of the problem lies in an unstated assumption in your PCTapproach. It seems to me (though I'm not altogether sure) that in your 3 dof'little man' that you somehow know which joint to move to affect which 'desiredstate' (by which I assume you mean x, y and z). IN your sub-spaceapproach, I think you partition the problem in such a way so as to make theinteraction between the joint-spaceand the cartesian space easier. With 3 dof, this kind of intuitive approach ispossible. In general, and for a 6 DOF industrial robot, EVERY joint has someeffect on EVERY coordinate of the end effector. Likewise, EVERY coordinate ofthe endeffector is affected by EVERY joint in some way or another. Note thatthis is true, in general. Clearly there are special geometries and specialconfigurations for which the problem de-couples.

In robotics, we deal with this as a coordinate transformation relatingsmall movements of the joints with corresponding small movements in the end-effector space. This relationship is represented in a matrix called theJacobian matrix. This also represents the relationship between velocities inthe two coordinate frames (divide both small motions by a small delta-time). In general, this relationship is defined by the geometry and allows usto compute a set of x-y-z(and rotational) speeds which result from a given set of joint speeds. To movein the other direction, we need to take the inverse of this matrix (which is6x6 and very 'goopy').

In terms of control: Imagine I'm at point 1 in x-y-zspace and I want to get to point 2. I can draw a 'desired velocity vector'which will tell me the way to get to point 2 from where I am. BUT the only wayto ensure that I will move the robot in such a way that I get there is totransform that 'desired velocity vector' which is, by its very nature, definedin the x-y-zframe, into the coordinate frame of the joints. This is done by assembling the6x6 Jacobian matrix for that 'pose' of the robot, inverting it and multiplyingit by the 'desired velocity vector'. The result is a set of joint rates whichwill move the robot along the desired path. This process has to be updatequite often (10-20ms intervals) and I think now the problem of higher degrees of freedom becomesclearer.

One other point I'd like to address. You made mention of 'unspecifieddegrees of freedom'. This area is well known to the robotics field asredundant degrees of freedom, most often considered in the control of 7 DOFrobots. The problem is that, in control, you can never say that the 'arm willassume some arbitrary configuration' When you control a piece of hardware, youmust control it completely. The problem is, which of the infinite number ofarbitrary configurations is best, according to some arbitrary criteria (mintorque, obstacle avoidance, etc.)

Well, I've rambled on enough for now. What do you think? Does this seemto address the confusion?

-JohnGardner

Mechanical Engineering Penn Sate Univ University Park, PA 16802

Date: Wed Jan 20, 1993 12:55 pm PST

Subject: Re: Robotics and degrees of freedom

[From Rick Marken (930120.1200)] John Gardner (930120.1400) --

One of your reasons for believing that the addition of df will be a problemis that they will have unpredictable (or, at least complex) effects on theother df. But this is precisely why the perceptual control model is the rightorganization for control of multiple df. The effects of the controlled df (orthe outputs that effect them) on other controlled df are treated asdisturbances and compensated for automatically by the input control systems.That's why you don't need all those inverse kinematics and dynamicscomputations; all the system cares about is the controlled degrees of freedom(as perceived) --the system must also be set up so that it can have (relatively) independentinfluences on these df; but after that (and some proper stabilization --EASY) you're ready to boogy (er...robot).

Best Rick

Date: Wed Jan 20, 1993 3:57 pm PST

Subject: Re: robotics and degrees of freedom

[From Bill Powers (930120.1530)] John Gardner (930120.1400) --

It's wonderful to have you real control engineers speaking up. I've gladyou broke your silence. I think that eventually you guys are going to be ableto tell me why the PCT model works, even if you start out by telling me why itcan't work.

There's one thought to hold firmly in mind: it is highly unlikely that thelower reaches of the brain and the cerebellum are computing the quantitativeinverse of a 6x6 (or when you come down to it, a 26x26) matrix in order to movethe limbs, walk, balance, and so on, all at the same time and in real time. SOTHERE HAS TO BE A MUCH SIMPLER WAY.

> I think the root of the problem lies in an unstated assumption in yourPCT approach. It seems to me (though I'm not altogether sure) that in your 3dof 'little man' that you somehow know which joint to move to affect which'desired state' (by which I assume you mean x, y and z).

Yes, that's true. To move the fingertip upward in visual space, either thevertical shoulder angle or the elbow angle should be changed, or both. Put thatway, the problem sounds ambiguous, because whether crooking the elbow wouldraise or lower the visual y position of the fingertip depends on how the arm isconfigured relative to the line of sight from the eye.

Furthermore, to change the z coordinate (distance from the eye), the elbowangle must be altered --but that will change the vertical coordinate, either raising or lowering thefingertip depending, roughly, on whether the interior elbow angle is less thanor greater than 90 degrees.

I think this way of looking at the problem is at the root of theconventional approach. There seems to be no solution but to solve the inversekinematic equations to find the angles that will fit the requirement of both acertain y position and a certain z position. This is only a two-dimensionalcase, so there's no big problem in doing this. Nevertheless, there's an easierway using control systems and without explicitly solving the simultaneousequations.

The solution is to build one control system that controls the verticalshoulder angle and a second one that controls the EXTERIOR elbow angle. The ydimension of the fingertip position, as seen, is altered by varying theshoulder reference signal. The z dimension is controlled by sending a referencesignal r to the elbow angle control system, and a reference signal -r/2to the shoulder vertical angle control system (adding to the other referencesignal).

When this compound reference signal is made larger, the exterior angle atthe elbow increases proportionally, and the shoulder angle is _depressed_ byhalf that amount. The result is that the fingertip moves nearly along a linebetween the fingertip and the shoulder, radially. This has a slight disturbingeffect on the visual y coordinate, but it is no longer ambiguous and themagnitude of the interaction is small enough that the visual control systemscan easily compensate for it. So we have converted from the ambiguous problemto an unambiguous one, and we have two axes of control that are sufficientlyindependent for normal control action to soak up any remaining interactions.The visual systems, of course, control the visual y and z coordinates of thefingertip by altering the two reference signals we have created.

This is only a two-dimensionalillustration. When we bring in the shoulder x control system we have again aninteraction among the control system actions, but in visual space thedisturbances caused by one axis of motion on the other two axes are modest andthe visual control systems (or a still higher level of kinesthetic controlsystems) easily compensate. This, by the way, is also how the dynamicalinteractions are prevented from any important effects.

I see no reason in principle why this approach can't be extended to four ormore degrees of freedom. If we can agree that the brain is NOT computingquantitative inverses of 6x6 matrices to better than one percent accuracy, thisseems to be the only remaining approach. Each degree of freedom is put underdirect feedback control. Then the control systems are put under the control ofa higher level of control that senses combinations of the variables, removingambiguities not by literally solving simultaneous equations, but in theanalogue mode, by assuming a solution and using it to feed back to alter thevariables in the right direction to bring about that solution. This processbears some resemblance to solving large sets of equations by successivesubstitution, but it does so without the use of any inverse calculations. It'smore like a method of steep descent.

> In general, and for a 6 DOF industrial robot, EVERY joint has someeffect on EVERY coordinate of the end effector. Likewise, EVERY coordinate ofthe end effector is affected by EVERY joint in some way or another.

Yes. You should take a look at Rick Marken's spreadsheet model ofhierarchical control systems. This model has three levels with six systems ateach level; each system perceives a variable made up of ALL SIX of the lower-levelperceptual variables (or external controlled variables), and acts bycontributing to ALL SIX reference signals at the lower level (or all sixexternal physical variables). Each system controls its own composite perceptualsignal quite independently of what the other systems are doing (unless, by badluck, the six perceptual functions compute linearly dependent functions of theexternal variables).

Marken's demo works in a simple linear space without any complex externalconstraints, so it's really only a start toward solving the arm problem. But itshows that there is no problem caused merely by having six control systems allof which sense all of the variables, in different ways, and act by affectingthe states of all the variables. As I said before, I have done this in 50dimensions, with no great problem, using randomly-chosenweights for each of the 50 inputs to each of the 50 perceptual functions in the50 control systems.

Nonlinearities and limits are going to complicate this problem, to be sure,but I think there's a basic principle here that isn't being used inconventional robotics. It's important because it doesn't require any complexcalculations, and the system can work with normal analogue tolerances.

> In terms of control: Imagine I'm at point 1 in x-y-zspace and I want to get to point 2. I can draw a 'desired velocity vector'which will tell me the way to get to point 2 from where I am. BUT the only wayto ensure that I will move the robot in such a way that I get there is totransform that 'desired velocity vector' which is, by its very nature, definedin the x-y-zframe, into the coordinate frame of the joints. This is done by assembling the6x6 Jacobian matrix for that 'pose' of the robot, inverting it and multiplyingit by the 'desired velocity vector'.

This is essentially how I thought it was done. Tell me something: in orderto get, say, one percent accuracy in the final position in x,y, and z, whatkind of computational accuracy must be maintained during the matrixcalculations, and how accurately do parameters like muscle response to signalsand arm mass distribution and geometry have to be known? If gravity were beingswitched randomly on and off during this movement at unpredictable times, whatwould happen to the outcome? Do you see any way at all that the human nervoussystem, working with frequency-codedanalogue signals having a dynamic range of something like 50:1, could do thenecessary matrix inversions with enough accuracy to explain the behavior wesee? I think it's very important to question whether the nervous system has theproperties necessary to solve this problem as you describe. It's important forthe reason I stated at the beginning: if the nervous system lacks thecapacities needed to carry out this approach, yet produces the kind ofexquisite control that we observe, it must be operating on a completelydifferent, and much simpler, principle. I think that the PCT approach is atleast a hint as to what that principle might be.

Best, Bill P.