challenge -Reply

[Hans Blom, 950914c]

(Bill Powers (950914.0540 MDT))

If you could just plug your control-system model (with a function
call) into the line in my code labelled "model" I could then compare
how the two models work and perhaps come to understand that they are
the same, or that they do the same thing.

Will do. Give me some time. They do the same thing: control.

I really don't see how your approach and mine could be equivalent.

They are equivalent in that they both control. But they don't control
in the same way.

I'm a somewhat concrete thinker, so actually seeing your program run
would help me to understand.

All right. I might be able to find some spare time over the weekend.

Greetings,

Hans

[Hans Blom, 950918b]

(Bill Powers (950915.2100 MDT))

I've spent a good part of the day trying to understand your program.
I still can't claim to understand why it works, but part of the
explanation seems to have something to do with my choice of k = 1 in
the environmental feedback function.

No, it doesn't.

Here is your code segment modified to allow changing k:

It may be as easy as a simple error in your code. Change the line

u := r[i] - dpre;

into

   u := r[i+1] - dpre;

Note that at this point in the program you compute the control
u[i+1], not u[i], and that this u is applied in the NEXT iteration,
at time i+1, not in the current one. The reference required at this
time is r[i+1] rather than r[i].

It may seem strange to refer to r[i+1] when the index counter is i. I
did that to keep maximum similarity to your program. Interchanging
the program order (computing u first, then the world model that uses
this u) would keep the index the same.

I cannot try it out right now, but that's most probably the problem.

Greetings,

Hans