📄 gaf.doc
字号:
alt-Q : quit the program
cursor keys to scroll up, down, right, and left of text window
All other keys, while not in continuous mode, are treated as
"Enter" for single step.
Another major feature in GAF is that you can tune your system by
trying different schedule rate (or cycle time defined in each
segment). There are different time modes offered by simulation mode
and check mode. These time modes are: real time mode, simulated time
mode, sim-schedule mode, and 24 hours clock mode. Please refer to
the Control section for details about these time modes. There is an
easy way to change the sampling rate in sim-schedule and simulated
time mode. That is to use the '+' and '-' keys. By press '+' or '-'
key, GAF adjusts the schedule rate or cycle time by increasing or
decreasing an adjustable amount. Please refer the Control section
for setting the adjust amount. The current sample rate value will be
displayed in the hint window.
A: Adapt mode
The genetic-adapt mode is an offline adaptation mode. While fuzzy
logic mimics the human's imprecise reasoning, the genetic algorithm
mimics the evolution of the nature. The genetic algorithm uses
randomization techniques to reach local optimum without exhausting
searching through the solution state space. With randomization,
genetic algorithm is also capable of escaping from local optimum and
hopping into a new better state. GAF uses genetic algorithm to
derive proper rules and fuzzy sets from the initial rules. By
changing, adding, deleting rules and fuzzy membership sets of the
fuzzy system, the genetic algorithm automatically adapts and
optimizes the fuzzy control system.
Besides the feedback segment, the adapt mode also needs an
evaluation segment for evaluating the result of adaptation. There
are two ways to specify evaluation segment, canned evaluation or
user defined segment. See Evaluation section for detail.
The evaluation process for genetic-adapt is defined as follow. GAF
runs through all preset cycles, which are preset conditions defined
in evaluation segment. After each cycle the result score from the
evaluation segment (see Evaluation for defining result) is compared
to the minimum score. If it is below the minimum and the gene pool
(saved best generations) has been filled up, GAF stops further
evaluation of any unfinished cycles. The overall evaluation result
will be the average score of all the preset cycles.
The creating of a new generation is described as follow. In order to
produce a new generation, GAF picks, with weighed random, one or two
out of the gene pool (saved best generations) based on genetic
algorithm and availability in the pool. Then applies the selected
genetic algorithm to the picked item(s) to create a new generation.
After starting adapt, GAF evaluates the selected adapt segment and
saves it on the top of the gene pool. The pool can save up to one
hundred best adaptations (or generations) in the order of their
performance -- the evaluation result. See section Adapt for setting
number of gene pool. GAF then produces a new generation and
evaluates this new generation. The evaluation result is compared
with those in the pool, and the new generation will be either inserted
in the pool or thrown away. GAF repeats this process -- creation,
evaluation, and judging the result, until reaches a pre-specified
maximum iteration or quit from the user.
User can specify the test time for preset test cycle and number of
samples should be taken for evaluation. The test time is used to run
each preset test, then GAF samples the score result for the
specified number of times. The preset evaluation result will be the
average of all samples, and the final result will be the average of all
preset cycles. For example, if the test time is two seconds and the
number of samples is 4 (with 0.1 sample rate), the total time for a
preset cycle will be 2.3 seconds. See Evaluation section for how to
define evaluation result.
The following interactive interfaces are supported in adapt mode.
C : continue
Alt-C : switch to continuous mode
Alt-P : turn on iteration pause
Alt-A : turn on preset cycle pause
Alt-Q : quit the program
cursor keys to scroll up, down, right, and left of text window
All other keys will halt adapting temporary.
Control: Change Simulation Parameters
The control menu allows user to change the control and simulation
environment. Currently only following functions are supported.
R: Real time mode
T: Sim time mode
S: Sim schedule mode
As mentioned, there are four different time modes: real time mode,
simulated time mode, sim-schedule mode, and 24 hours clock mode. The
real time mode uses actual system clock (computer clock) for
scheduling the segments. This mode is the only allowed mode for
running in the control mode. The following is an example of how real
time mode schedules a three segments system with 0.1, 0.2, and 0.3
cycle time. Assume that each segment takes 0.05 second to run. GAF
scheduling table will be:
Sweep # Time Seg 1 Seg 2 Seg 3
------- ----- ------ ------ ------
1 0.00 Run Run Run
2 0.15 Run --- ---
3 0.20 --- Run ---
4 0.25 Run --- ---
5 0.30 --- --- Run
Instead of using real system time, the simulated time mode uses fixed
time interval to simulate the schedule rate for the system. For
example if the user specifies schedule interval is 0.1 second. Then
the above scheduling table will be:
Sweep # Time Seg 1 Seg 2 Seg 3
------- ---- ------ ------ ------
1 0.0 Run Run Run
2 0.1 Run --- ---
3 0.2 Run Run ---
4 0.3 Run --- Run
5 0.4 Run Run ---
The sim-schedule mode resembles the simulated time mode, except that
it does not use the cycle time of each segment for scheduling.
Instead the sim-schedule mode uses the schedule rate for all
segments, i.e. runs all segments all the time. Therefor, the
scheduling table will be:
Sweep # Time Seg 1 Seg 2 Seg 3
------- ---- ------ ------ ------
1 0.0 Run Run Run
2 0.1 Run Run Run
3 0.2 Run Run Run
4 0.3 Run Run Run
5 0.4 Run Run Run
C: Sim schedule rate
Use this option to set desired time interval in seconds for either
simulated time mode or sim-schedule mode.
K: Sim clock mode
The simulated clock mode is a variation of sim-schedule mode. This
mode allows user to simulate 24 hours clock within a single plot
frame.
I: Increment value
As mentioned, an easy way to change the simulated schedule rate is
to use the '+' and '-' keys to increase and decrease the schedule rate.
This option allows user to set the amount of increasing/decreasing,
the default value is 0.005 second.
Segment: Change segment and value
The segment menu offers user three major functions:
Select a segment for display or for following actions
Change/modify the segment
Control/change the display of the segment
S: Segment number
Use this option to select a segment. The default selected segment
is the first segment (the segment 0). The selected segment is
displayed in the display window and title window.
C: Cycle time
Change the cycle time for the selected segment. Note that the real
cycle time may depend on the running mode and time mode been
selected. Refer to Run and Control sections for more information.
I: Set input value
O: Set output value
L: Set local variable value
These options allow user to manually set a variable's value. After
select one of these options, GAF pops up a window with all variable
names alone with their variable number. Select a variable, GAF then
requests for new value. Enter the new desired value will close all
windows. Note that you can use F7 to reset the system, see function
key for detail.
G: Set output gain
Use this selection to change the gain of selected output. Again, just
like setting variable value, GAF asks for output variable and then
the new gain value.
E: Enable rule
D: Disable rule
GAF allows you to enable or disable the rule(s) in any of the running
modes. The disabled rules are marked with 'x' at the first column in
text window. Select one of these options, GAF then highlights the
first rule at the second column in text window. Use cursor keys to
move highlighted cursor and then press 'Enter' to enable or disable
the rule.
A: Enable all rules
This option gives user an easy way to enable all rules.
P: Display result
After changing the Display window's arrangement, i.e. selecting whole
display or no plot mode, use this option to select the desired output
you want to display. GAF automatically selects the first output for
display.
R: Display rule firing
The above option (Display result) allows user to specify the output
to display, this allows user to select rule to be displayed with its
detail inferencing in firing window. When select this option, like
disable/enable rule, GAF uses the text window for selecting menu.
Note that selected rules are marked with 'x'.
N: Combined result only
When this option is selected, GAF deselects all rules from displaying
its inference (firing window). So only the combined result will be
displayed.
S: Preset to
Use this option to preset to a specific state defined by "PRESET"
statements in segment(s). GAF will prompt for the preset number.
Display: Arrange Display Windows
The display menu allows user to arrange and select the screen layout,
text font, and color of the screen display. In future version, GAF will
also allow user to put all these features in a configuration file, which
will be read in during initialization.
1: Use standard font
2: Use small font
With these two options, you can switch between normal text display
or small font text display.
3: Select normal display mode
The normal display mode displays the text window on the left portion
of the display window and the plot window on the right. See window
split for changing the size of text window.
4: Select whole display mode
In this mode the text window still occupies the left portion, but the
right portion of the display window splits into two parts, the upper
half shows the plot window, and the lower half displays the combined
result and firing window. See Segment section for more information
about selecting rules and outputs. See window split for changing size
of text window.
5: Select plot only mode
This option allows you to see only the plot. GAF dedicates the entire
display window to plot sub-window except reduces the text window to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -