[From Bruce Abbott (2017.11.25.1630 EST)]
Rupert Young (2017.11.25 14.20)]
Here is a demo of a parameter reorganisation using random changes as used in Bill’s demos.
https://youtu.be/HQwPShnYwLs (The upload to youtube is a bit blurry so you can see the original here if needs be https://www.dropbox.com/s/eotka6uef8dfuxo/gain%20reorg.mp4?dl=0)
It is adjusting the gain in an output leaky integrator function for a single control system to reduce the error response of the system as measured over a certain period, of 100 iterations.
The video shows graphs for 1) the error response, 2) the control system input, output and reference, and 3) the gain value.
The gain starts out at 500000 (slowing factor of 1000000). Initially, while the error increases, the gain adjustment changes randomly (every 100 iterations), but when an adjustment value results in the error reducing then that value is continuously applied to the gain on each iteration. This continues until the gain value has changed to a value that results in increased error, which would then lead to another random adjustment.
In the video it can be seen that the gain increases until it reaches the optimal value of around 2000000 and stabilises (for a while) at around time of 1.30. Later, around 5.45, it gets grossly out of control but does actually recover to be very stable.
The correction to the gain is computed thus,
correct = learningrate * delta * errorresponse * parameterMA;
where delta is a random number between -1 and 1, parameterMA is a moving average of the gain value. In the demo learningrate= 1;
This adjustment value is changed every 100 iterations if the current error response is > than the previous error response
Comments welcome. As well as any suggestions of issues that need to be taken into account, particularly in terms of generalising the algorithm.
BA: Nice work!
BA: The TrackAnalyze demo from LCS III does something similar during the “Analysis” segment of the program; it finds parameter values of the model control system that produce the best least-squares fit between model and data. If you haven’t already, you might want to take a look at the fitting algorithm, which fits several system parameters in a particular sequence. The rate of change in the parameters decreases as the error diminishes.
BA: Download the source code at https://sites.google.com/site/perceptualcontroldemos/
Bruce