setup and operating instructions: transfer function iteration algorithm

SETUP AND OPERATING INSTRUCTIONS:
TRANSFER FUNCTION ITERATION
ALGORITHM
Developed by: R. Tyler Ranf, Undergraduate Research Assistant,
Department of Civil Engineering, Washington University in St.
Louis
Supervised by: Dr. Shirley J. Dyke, Associate Professor,
Department of Civil Engineering, Washington University in St.
Louis
Purpose
Because a shake table is a dynamic system, the commanded displacement cannot be
reproduced perfectly at all amplitudes and frequencies. The transfer function iteration algorithm
is commonly used to control a shake table, facilitating the reproduction of historical earthquake
records. It is an iterative approach that will update the command signal based on errors in the
resulting earthquake record.
The program discussed here has been developed to allow users of the UCIST instructional
shake table (made by Quanser Consulting) to implement the transfer function iteration
algorithm. The program uses measurements of the table acceleration response to determine
an appropriate command signal to apply to the Multi-Q board. The errors in the acceleration
response are used to update the command signal. After a few iterations, a command signal
that accurately reproduces the desired earthquake is determined, and this can be saved for
use in future experiments on this equipment.
For more information on the Transfer Function Iteration Algorithm, see the following
references:
z
z
z
Fletcher, J. N. (1990). "Global Simulation: New Technique for Multi-axis Test
Control," Sound and Vibration, November.
Spencer Jr., B.F. and Yang, G. (1998), "Earthquake Simulator Control By
Transfer Function Iteration," Proceedings of the 12th ASCE Engineering
Mechanics Conference, San Diego, California, May 17–20, pp. 776–769.
B. Nepote, S.J. Dyke, and J.M. Caicedo, "Implementation of the Transfer
Function Iteration Method for the Control of Earthquake Simulators"
Proceedings, Second European Conference on Structural Control, Paris,
France, July 3–6, 2000.
Equipment
All of the equipment needed to run this experiment is provided in the shake table experiment.
The required components are: the shake table, power module, one accelerometer, the
computer and Wincon software, and MATLAB (including the Real-time Workshop Toolbox and
Simulink). It is not necessary to install a test specimen on the shake table to run the algorithm
and determine a command signal. However, if the test specimen is likely to change the
dynamics of the shake table (if it adds significant mass to the table or has modes near the
modes of the shake table) more accurate results will be achieved if you run the algorithm with
the test specimen on the table. No measurements of the test specimen are required for the
algorithm.
Getting Started
Before using this program, you should be comfortable with the operation of the
instructional shake table (if you have not done so already, we strongly recommend that
you run through the sample experiment to gain experience with the behavior of the
shake table and the use of the software). Please read through all instructions before
beginning to use this program on the shake table. For your safety and to avoid
damaging the shake table, it is important that you understand all steps before running
the program.
1. Make sure all of the appropriate files are in the same path. The files that are required in
order to run the transfer function iteration program are displayed in Table 1.
Table 1: Files that are needed before beginning the transfer function iteration program.
xitergui.m
Main MATLAB program generating graphical interface.
xiter.m
Code to perform interations. Called by xitergui.m
xfirst.m
Code to determine transfer function. Called by
xitergui.m
design.m
Original design parameters for shake table.
DO NOT MODIFY.
xfunc.m
Computes transfer function from raw data.
wc_open.m
Opens and starts the wincon program.
cs_send.mdl
Simulink model used to send command to shake table.
q_modules3.mdl
Simulink model called by cs_send.mdl
shaker_I.mdl
Simulink model called by cs_send.mdl
elc.mat
El Centro earthquake file.
sample.mat
Sample earthquake file (for short run).
q_cal_x.wcl
Wincon pre-compiled model used for calibration.
tfiter.wcp
Wincon Project file called by TF Iteration programs.
While running the program, files will be created. These created files will then be
saved in the same directory. A list of the files that are created, along with the
general description of what the file is, is displayed in Table 2.
Note: Your computer should already have a copy of the wc_open file.
One of the lines in that file, (fwhich), does not work. The old file should
be replaced with the wc_open file in the package that uses the (which)
command. If this is not done an error will occur.
Table 2: Files that are created by the transfer function iteration program.
command.mat
TFinv.mat
param.mat
atrack.mat
cs_run.mat
tf*.mat
The signal to find the transfer
function
Saves Hinv & Hfvec for use in
xiter.m
The parameters created in xfirst.m
Saves the chosen signal for use in
xiter.m
time history data from xfirst.m
transfer function data from xfirst.m
2. Make sure that the components of the shake table experiment are set up
correctly and all cables are connected, as described in the users manual for the
UCIST shake table. It is not necessary to have the building on the shake table
and have the sensors on the structure connected.
3. Turn on the power supply and wait to see that the right and left indicator lights
blink. .
4. Use Windows Explorer to open the UCIST directory: [C:/UCIST/boot ]. Double
click on the file <boot.exe>. There may already be a shortcut on the desktop to
this program. The indicator lights on the power supply should stop blinking. If
they do not stop blinking, check the connections and reboot if necessary.
5. Go to the 'Start' menu, and under the 'Programs' and 'Wincon3' menus start
W95Link. This links the Wincon programs to MATLAB. An icon will appear in the
lower right corner of the Windows toolbar.
6. Calibrate and center the shake table. To do this, go to the 'Start" menu, and
under the 'Programs' and 'Wincon3' menus start W95Server. Click on the model
menu, and select 'open'. Go to the [C:/UCIST/pc/tfiter] directory and open the file
'q_cal_x.wcl'. Hit the <start> button on the Wincon server. The table will move to
the centered location if it is not already there. The red 'cal' indicator on the power
supply will turn off, and the green 'home' indicator light will turn on.
You are now ready to begin the transfer function iteration routine.
Running the Program
Note: For a 60 second earthquake, the total running time for this program
takes about 2 hours. A short sample signal, 'sample.mat' has been
created to allow users to run through the algorithm expeditiously. To run
the sample signal (this is recommended for an initial run through of the
code) the user should accept all default values. The sample code will
only require about 30 minutes for a few iterations.
1. To
begin, open MATLAB.
[C:/UCIST/pc/tfiter] directory.
Change
the
current
MATLAB
directory
to
the
2. Type <xitergui> in MATLAB to begin the transfer function iteration program. This
command will generate a graphical interface with several buttons. You will run the
program by pressing these buttons in a specified sequence. DO NOT use them in any
other order. If you have an error, restart MATLAB from step 1 of this section.
3. Press the "Generate Initial Command Signal" button. This step will take about 1 minute to
generate a random command signal. This command will be used to provide input and
output records for use in computing the transfer function.
4. After the signal is generated, a plot will appear showing the signal to be used. The
program pauses here. When you see the plot, you can press any key to continue, and
the program will compile and download the required Wincon model. [For the sample, this
will take about 2 minutes.] When the program has finished downloading, the Wincon
Server will open automatically, and begin running the shake table.
5. When the test is complete, Wincon will generate a plot of the shake table acceleration
response. The program pauses here and displays a message in the Matlab window "Test
complete." Press any key to continue and the data from the plot will be stored to a file
(cs_run.mat) for later use.
6. The program will go on to compute the transfer function and save it in a file (tf*.mat). You
have now obtained the transfer function for the system, and the iterative procedure will
be based on this data.
Now you begin the iterative portion of the program.
7. The program pauses here. Press any key and you will be asked for the name of the
earthquake file you would like to reproduce. [Select sample.mat if you are running the
sample]. This file must contain 2 variables: ad0 = earthquake accelerations (at 256 Hz in
g's) t = associated time vector (in seconds).
Note: Before pressing the key to continue, wait until the graph has been
redrawn. Failure to wait will result in an error.
8. A figure will appear. This is a plot of the acceleration signal in the data file you specified,
and the filtered signal (restricted to 0.25-10 Hz) that the shake table will try to reproduce.
A second figure will appear and provide a graph of the error between the two signals. A
third window will appear and provide a graph of the inverse of the transfer function.
9. Close the Wincon server window. Press the "Perform Transfer Function Iteration” button
in the MATLAB GUI window. This button starts the iterative procedure performed in
(xiter.m). The Wincon server window will reappear, and the desired and actual signals
will be plotted. This step takes about 30 minutes for the 60 second signal. (This takes
about 5 minutes for the sample signal).
Note: On closing the Wincon window, it will ask whether you would like to
save the changes. Say NO or certain pre-determined settings might be
lost.
Note: When the Matlab Window asks if you would like to use the default
tfiter parameters, don't say no unless you know what to change them to.
Using the improper parameters can cause the shake table to go unstable.
10. Once the program stops, and all of the data is plotted, close the wincon window and
press return. NOTE: Not closing the window might result in an error plotting the
data, and will result in the need to start over.
11. Continue procedure 9 and 10, closing Wincon after every iteration, until the actual signal
is close to the desired signal. Once the signal becomes close to the desired signal, do
not keep going. The actual and the desired signal do not converge from both directions,
so the actual signal will go past the desired signal and not converge again.
At current settings, 3 to 4 iterations are needed before convergence.
12. Once you are comfortable with the produced signal, press the "Stop Iteration" button.
This will stop the iteration procedure. The final signal that was produced is saved in the
directory as <s408_# >, the # is the number of the iteration that you are on. For
example, if you are happy with the signal after the third iteration, the file that you would
want is <s408_3>. However, if after the third iteration, you are happier with the second
iteration, the file that you would want would be called <s408_2>
13. The results that you obtain will be stored in s408_#.mat. In order to use these results,
load s408_#.mat. Once you have done this and you wish to reproduce the plot that you
obtained during the program, type in the command
plot(t(1:length(ad)),ad, t(1:length(yclip)),yclip);
Obtaining a Rough Rep lication
To obtain a command signal that will produce a rough replication of the earthquake, only one
iteration may be used . One iteration will allow the peaks of the desired and measured signal
to align. It will not, however, provide the full magnitude of the earthquake. Instead, the
earthquake will be roughly 75% of the desired signal.
NOTE: In order to increase the magnitude of the earthquake, "g0" can be
increased. This constant is located in the program <xiter.m>. Although
increasing this value will better assimilate the intended magnitude of the
earthquake file, the alignment of the time history of the earthquake will be
compromised.
Instructions While Running the Program
In case you need guidance while running the program, step by step instructions on running
are included and will appear in the Matlab window at the appropriate time in the program. If
there is just information that is being displayed about what the program is doing, this
information will show up in Matlab as a line of text. If the information is instructions on what
to do next, the text will be highlighted by percent marks both on top and on bottom of the
instruction line. Examples are below.
Information line
Generating command signal, please wait
Instruction line
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Once the Shake table has stopped, press any key to continue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Acknowledgments
This program was developed with support, in part, by the National Science Foundation under
NSF Grant No. DUE-9851198 and through the Research Experiences for Undergraduates
program under NSF Grant No EEC-9820506. Technical support was provided by Quanser
Consulting.
This version of the program was revised for compatibility with the Multi-Q board (Quanser
Consulting) by R. Tyler Ranf. The previous version of the code was originally written by Dr. Bill
Spencer and Guangqiang Yang, and revised by Barbara Nepote, and Juan Caicedo.