[From Bill Powers (920515.1000)]
Chris Love (920514.1000) --
It looks as though you've done things with Little Baby a lot like I have
done them with Little Man. Looks good.
A tip on depth perception. If the left eye and the right eye both see the
fingertip and the target, the lateral separation between the two as seen by
the two eyes will be different if the distances are different. Define:
LEt = target angle seen from left eye
LEf = finger angle seen from left eye
REt, REf ditto for right eye,
All angles are measured from a retinal reference point, say the center. The
angular separation of target and finger in the two eyes is
LEs = LEt - LEf
REs = REt - REf
The difference between LEs and REs is
REs - LEs = REt - REf - LEt + LEf
= (REt - LEt) - (REf - REt)
The final terms on the right show the amount of "doubling" of the target
image minus the amount of doubling of the fingertip image, after the left
and right images are combined. No matter how the eyes are converged, the
only way the amount of doubling in the two images can be the same is for
the target to be at the same distance from the eyes as the fingertip. So
the reference-doubling can be taken as REt - LEt, and the perceived
doubling as REf - LEf. The error signal drives the elbow angle to change
the "reach" distance; when the error is zero, the fingertip is at the same
distance as the target and both images are doubled by the same amount.
I think this is a more "physiological" way of perceiving depth than
computing sums of squares.
Actually, in Version 1 of the Little Man I used
k * (eye separation)/(REx - LEx) as the distance perception, because it
gets larger as the disparity decreases, the way we actually perceive
distance. Of course you can't let the denominator go to zero.
Alternatively, you could say that we control for proximity, and use the
difference-signal right-side-up.
My Version 1 didn't have separate eye control -- I just tilted and rotated
the head with the eyes fixed in it. Version 2 does move the eyes in the
head in addition to head control, and I will shortly add the control
systems to make each eye track the target independently, with a fraction of
the movement being head movement. Then another approach to depth perception
becomes possible, which you might like to try:
With the eyes converging, the output signals of control systems for each
eye can be perceived as "reafferent" signals (equivalent to sensing the
reference signal sent to oculomotor systems, an imagination signal). The
difference between these signals indicates, by the same arithmetic as
above, the distance at which the eyes are converged. This is subjective
distance, of course, not linear objective distance.
Now we have THREE depth signals: the doubling of the target image indicates
target depth, the difference in eye-position signals indicates depth at
which convergence takes place (whether there's an object at that depth or
not), and the doubling of the fingertip image indicates the fingertip
depth. I think this arrangement will prove useful when I get around to
introducing true "transition" control -- path planning, as I now think of
it. The fingertip is first controlled to show zero doubling: this brings
the fingertip to the same depth as the convergence depth. Then the
convergence depth is varied to reduce the target doubling to zero. In the
process, the fingertip tracks the moving convergence depth while the
convergence depth is moving toward and tracking the target depth. This will
allow adjusting one time constant -- that of the convergence control
systems -- to vary the speed with which the fingertip moves from an initial
position to the target. This same principle would be used for x and y
control, which are easier. The great advantage of this two-step arrangement
is that when the target suddenly jumps to a new position, the kinesthetic
systems that move the finger aren't hit with an infinite rate of change of
position reference signals.
Of course when I actually get around to doing this, a completely different
idea might suggest itself. I won't do this until Version 3 -- Version 2
goes to Greg Williams today for wringing out the uglies.
···
-----------------------------------
Your sequence of events looks OK to me. The trick is to complete all
calculations for a time slice that involves NO CLOSED LOOPS, so that in
effect everything is changing simultaneously. Then you close all loops with
one final calculation that goes through the external world and changes the
inputs to the perceptual systems. You seem to be using purely integral
output functions (adding deltas) so you won't have any problems with
computational oscillations unless you make the deltas too large. If you run
into instability (smooth overshoot or oscillation) problems, you might try
adding a proportional output component (proportional to error but not
integrated). This will put some damping into the system.
You say, "I want to know whether it may be better to, say, propagate the
reference signals from the upper ECMs down to the lower ones before
evaluating the lower ones. "
The trick here is to figure out how to make all functions work in parallel.
Consider two levels of perception. If you evaluate the lower level first,
then convert it to the higher level perception, you've changed the lower
perception without simultaneously changing the higher one -- the higher one
now depends on the lower one at the END of the time slice rather than at
the beginning. So strictly speaking, you should evaluate the top level of
perception first, then the next lower, and so on, so every perceptual
function responds to the state of its inputs as of the start of the time
slice (the end of the previous slice).
On the output side, you have to do the opposite: compute the lowest ECM's
output FIRST, and then the next highest one, so that the lowest reference
signal is correct for the start of the time slice before you then change
it.
All in all, this says that you should start at the outputs of the lowest
level system and work backward through that ECM, then work backward through
the next level up, and so on.
Having said all that, I now confess that I actually do it forward, going up
the perceptual side and down the output side, computing as I go. The reason
isn't laziness, but Greg Williams, who insists that the model should
contain somewhat realistic transport lags. When you do this, you find that
a proportional model won't work because it oscillates violently. An
integral-output model (like yours) is required to compensate for the
transport lags, implicit in the computing cycles and the definition of dt.
By defining dt so that one computing cycle is the transport lag you want,
you then have to stabilize the model in a realistic way. I haven't really
done this very carefully. The best way would be to do exactly simultaneous
calculations, and introduce transport lags as shift registers so you can
specify the exact lag at each level. I didn't do it that way, because you
have to make dt very small and everything runs too slowly (for me).
By the way, don't confuse "transport lag" with "reaction time." Reaction
time, as normally measured, is a much higher-level phenomenon. Transport
lags at the levels we're talking about are around 9 milliseconds for the
spinal loops, maybe 50 milliseconds for the next level, and possibly 100 to
150 milliseconds for the lowest visual control level (not the saccade
level). The usual reaction times you read about are around a quarter of a
second, which is way too long for these control systems. And the way
they're usually measured, you can't tell a true transport lag from an
integration lag (which is a much more tractable and friendly beast).
These three (external angles) receive the deltas from the three angle
ECMs (interanal) and the Percepts (external), eg. LETx=Left Eye Target >x-
coord, LEFx= Left Eye Finger tip x-coord, are fed to all ECMs. >Finally
the reference (task) signal for the top four ECMs are zero >input, i.e.,
match finger to target
You can also use the Target position as the reference signal -- same
difference. In fact you'll want to if you add any higher level systems. The
reference signal is then the desired fingertip position, set by a higher
system concerned with a finger-to-target relationship (which needn't be
zero distance). But yes, what you're doing sounds fine and it's the way I
did it in Version 1.
After Greg goes through the Little Man Version 2 and OKs it, I'll make it
available for distribution -- at a price. I need a newer faster portable
computer with a bigger disk and a tape backup. Of course it will be
shareware for those who can't afford $100 and can't wring it out of their
institutions.
--------------------------------------------------------
For those awaiting Version 2 of the Little Man, here are the capabilities
currently in it (no big changes before release):
1. Spinal control loops incorporating stretch and tendon reflexes, with a
linear muscle model (I may stick in the nonlinear one before release --
turns out that it's just a square function, which will cause no
difficulty).
2. An arm model with two shoulder degrees of freedom and one df at the
elbow, with full kinematic treatment. Input to the arm model consists of
three torques; output consists of three angles one dt later.
3. A second kinesthetic level that changes to x,y,radius coordinates of
control where x and y are angles, not Cartesian coordinates. This level is
necessary to obtain a fixed reference position for the arm in a
gravitational field. When the first level alone is used, turning gravity on
makes the arm slowly sag, as in "waxy flexibility" typical of spinal
preparations.
4. A visual level that works in either of two ways (not simultaneously in
this Version): direct visual control as in Version 1, and visual control
through an adaptive 3-D map. The latter permits the model to reach out and
touch a target that is seen before but not during a movement, and in
general to reach out to visually remembered positions. This map-control
model reproduces fast-movement fingertip trajectories from the literature
very nicely, whereas the pure visual control mode does not.
The eyes track the target by moving in the head; the head also moves part
of the way. I may put in independent convergence in the release, but it
won't be used for depth perception. Haven't decided how that should go yet.
5. Two testing modes that drive the spinal systems and the kinesthetic
second-level systems with square-wave reference signals. All parameters are
adjustable from the keyboard so you can experiment.
6. An overall testing mode that permits manually or automatically jumping
the target back and forth between any two positions, while you adjust the
visual control parameters.
7. A learning mode that can be used when map control is on, gradually
making the kinesthetic space agree with the visual space. A random target
positioning mode is available so you can turn learning on with a cleared
map, go away and read a book for a couple of hours, and come back to find
the map all adapted (1331 cells). This will permit putting prism glasses on
the Little Man and demonstrating fast pointing errors that gradually adapt
out (as long as the change isn't too drastic -- there are limits to the
amount of correction possible). And of course have to be undone when the
glasses are removed. I haven't actually set this up, because the initial
adaptation process demonstrates the principle adequately; the kinesthetic
system begins out of whack with the visual system when you initialize a new
map.
You can also have the model learn just two points in the map, for quick
testing.
The "purpose" mode still works (with learning off but under map control);
the Little Man draws a circle continuously around the target.
The "live block diagram" mode still works, although it's not detailed
enough.
Maybe after Greg has played with the model for a while he can post a review
of how it works.
-------------------------------------------------------------------
Best,
Bill P.