[From Bruce Abbott (2014.01.31.1915 EST)]
The recent discussion of feedforward versus feedback control systems, together with Rick Marken’s prompting, led me to create a demonstration program that shows off the advantage of feedforward control. The program was modified from the TrackAnalyze demo that is included in the suite of programs that accompany LCS III, and works in exactly the same way with one small difference: There is now a pair of radio buttons that can be set for either feedback or feedforward control.
The default setting is feedback control, or in other words the usual PCT control system. I encourage you to try this mode first. After you have started the program, click on the “Collect Data” button to begin. A green horizontal line with a gap in its center will appear along with a red horizontal line. For feedback control the green line serves as the target; your job is to do your best to keep the red cursor centered in the gap between the lines of the green target. Using the mouse, move the mouse pointer into the area where the target is; when you do this, the mouse pointer disappears and your mouse movements now control the movements of the red cursor. Practice pursuing the target with the cursor until you feel ready to record some data.
You will notice a significant lag between your mouse movements and the cursor movements. This lag simulates a system with a sluggish response to control inputs. (Imagine the Titanic trying to turn away from the iceberg. The wheel was turn full to leeward as soon as the warning was given, but Titanic’s response to the helm was sluggish, and the rest is history.)
To record a data run, click on the “Start Recording” button at right (the mouse pointer will reappear when you move the mouse far enough to the right). You will then have four seconds to regain control of the cursor again and start pursuing the target. Do your best to keep the two aligned; after 60 seconds the run will end. Then click on the button at left labeled “Analyze Data.”
A window will pop up asking you for a filename to use for saving the data; you can keep the default if you wish or change the name to something descriptive such as “feedback.” The data from your run will be saved to disk and the Analysis window will appear.
In the Analysis window, two graphs are present. The top graph displays the target position, cursor position, and error (the difference between the two) for duration of the run. The bottom graph shows the results of the PCT model of the cursor (mouse) movements. You can adjust the model’s fit by changing the parameters of the model as shown above the graphs. Press the “auto fit” button to have the computer generate its “best fit.”
When you are ready to leave the analysis window, just click on the “End Analysis” button in the upper right corner.
For your second run, click on the radio button labeled “Feedforward.” The program will now run in feedforward mode. You should now think of the target as representing a disturbance that is varying over time. Use your mouse as before to keep the cursor aligned as closely as you can with the disturbance. Make your experimental run as before. When the run ends, click on the “Analyze Data” button and, when the window appears prompting you for a filename, save your data using a different name than before, e.g., “feedforward.” The Analysis window will appear and you can again view both the actual data from the run and the fit of the model, in this case, the feedforward model.
During the experimental run, by keeping the cursor aligned with the disturbance marker you were creating an output waveform that closely matches the disturbance waveform (how closely depends on how well you kept the cursor aligned with the disturbance). During the run, the disturbance values shown by the target position were being applied one second later to the controlled variable, which was not being displayed on the screen. At the same delay, the output waveform was being applied, inverted to the same controlled variable, thus cancelling the effect of the disturbance on the controlled variable (to the extent that you successfully tracked the disturbance). The analysis shows how well this feedforward model performed in dealing with the one second lag. You should notice a significant improvement compared to the feedback model.
A true Ashby-style feedforward model would simply sense the disturbance in advance of its impact on the controlled variable, invert the signal, and use that signal to develop a properly scaled output that closely mirrors the disturbance in its effect on the CV, but acting in the opposing direction. The result, theoretically, is errorless control, but physical limitations in the sensors and actuators mean that some error will be present. In this demo, I’ve used your own feedback control system (tracking the varying disturbance) to develop the opposing output, so there will be error in the output waveform as there always is with feedback control. Nevertheless, by tracking the disturbance BEFORE it has had a chance to affect the CV and then applying the inverted output in phase with the disturbance as it begins to affect the CV one second later, this system has vastly improved your ability to control the CV.
You can download the “Feedforward” demo from my website at https://sites.google.com/site/perceptualcontroldemos/home/other-demos . Put it in a convenient folder, unzip it, and click on the feedforward.exe file twice to run the demo. (You will need a PC for this demo.)
Enjoy!
Bruce