SYSTEM IDENTIFICATION TOOLBOX FOR MATLAB: DEVELOPING A GRAPHICAL USER INTERFACE

SYSTEM IDENTIFICATION TOOLBOX FOR MATLAB: DEVELOPING A GRAPHICAL USER INTERFACE
SYSTEM IDENTIFICATION TOOLBOX FOR MATLAB:
DEVELOPING A GRAPHICAL USER INTERFACE
Rebecca L. Leonard, University of Arkansas
REU Institution: Lehigh University
Principal Investigator: Dr. Shamim N. Pakzad
Graduate Mentor: Minwoo Chang
Abstract
System identification algorithms, such as the Eigensystem Realization Algorithm (ERA)
and the Auto-Regressive Moving-Average method with eXogenous terms (ARMAX),
make it possible to identify a system’s modal parameters based on its vibrational
response to a disturbance. Because these methods can be tedious and complex to
implement, there is a need for a comprehensive software package that simplifies the
computational process. A System Identification Toolbox for MATLAB (SITM) was
created to fill this void and allow for the comparison of seven different system
identification methods. A graphical user interface (GUI) was developed to enhance the
usability, speed, reliance, and simplicity of SITM. This paper will focus on the process of
developing a GUI for SITM and the optimization of the code to work with the GUI as
quickly and efficiently as possible.
2
Table of Contents
1.
Introduction .....................................................................................................
1.1 Research Background and Literature Review ...........................................
1.2 Project Objectives ......................................................................................
4
4
5
2.
Methods ............................................................................................................
2.1 Content .......................................................................................................
2.2 Layout .........................................................................................................
2.3 Coding ........................................................................................................
2.4 Testing SITM GUI Performance ................................................................
2.5 User Polling .................................................................................................
2.6 Documentation ...........................................................................................
2.7 SITM User Process .....................................................................................
6
6
7
9
12
12
12
13
3.
Results ............................................................................................................. 16
3.1 Functionality Confirmation ...................................................................... 16
3.2 User Feedback .......................................................................................... 16
4.
Conclusion
....................................................................................................... 17
5.
References
........................................................................................................ 18
6.
Acknowledgements
......................................................................................... 19
3
1
Introduction
1.1 Research Background and Literature Review
In the past decade, advances in micro-electro-mechanical systems (MEMS) technology
have paved the way for the development of multifunctional sensor nodes that make up a
wireless sensor network (WSN) (Pakzad et al. 2008). These nodes are less expensive to
install and maintain than wired sensor networks, and can also collect data at a higher
spatial and temporal resolution (Pakzad et al. 2010). Wireless sensor networks can be
used to monitor things like humidity, temperature, lighting, pressure, vehicular
movement, soil composition, noise, and mechanical stress, among other things (Akyildiz
et al. 2002).
A significant application in the civil engineering industry is the use of WSNs for
structural health monitoring. Researchers can use data collected by strategically-placed
sensors to identify a structure’s modal parameters, i.e. natural frequencies, damping
ratios, and mode shapes (Pakzad et al. 2010). Structural damage affects a system’s
modal parameters; therefore, these parameters may be traced over time to monitor the
health of the system (Chang and Pakzad 2011). The center for Advanced Technology for
Large Structural Systems (ATLSS) at Lehigh University housed an experiment to
evaluate the performance of a WSN by comparing the quality of influence coefficients
and the rate of convergence of estimated parameters of a scaled specimen of a steel
beam-column connection subjected to harmonic excitations. The performance of the
WSN was deemed acceptable and fairly capable of detecting structural damage. The
WSN was tested against a wired network and detected damage just as well as the wired
sensor network (Dorvash et al., 2010).
Over the past three decades, several system identification algorithms have been
published by various authors. System identification is the process of constructing
mathematical models of dynamic systems based on analysis of the system’s input and
output signals (MathWorks 2009). The Eigensystem Realization Algorithm (ERA),
proposed by Juang and Pappa (1985) is one of the most widely used system
identification methods to date, and has served as a basis for the formation of other
algorithms (Chang and Pakzad 2011).
Based on these system identification algorithms, a software toolkit, called System
Identification Toolbox for MATLAB (SITM), was developed to identify modal
parameters of a structure by processing the input/output or output only of a system
(Chang 2011). Users of SITM are able to investigate true structural modes, physical
mode shapes, and modal parameters based on data gathered by wireless sensor
networks (WSNs). MATLAB was chosen for the development of SITM because it meets
the following criteria: (1) ability to process eigenvalue/eigenvector and singular value
4
decomposition (SVD) functions, (2) ability to formulate large matrices and create
variables without pre-allocation of memory, (3) possession of built-in functions for
creating graphical results, and (4) compatibility with all major operating systems,
including Microsoft Windows, Apple Mac OS, and other UNIX systems (MathWorks
2009). SITM allows users to choose from the seven different system identification
methods shown in Table 1, depending on the data type of their system (Input/Output vs.
Output Only). Results are displayed in a stabilization diagram, which allows users to
graphically extrapolate true structural modes of a system (Chang 2011).
Table 1: SITM’s system identification methods by data type applicability. Input/Output
systems are denoted “I/O”, and output only systems are denoted “OO”. Note that
although there is an output only application of SRIM, that method is not presently an
option in SITM (Chang 2011).
ERA
ARMAX
I/O
OO
ERA
ERA-OKID
(impulse response only)
ERA-OKID
ERA-NExT
SRIM
I/O
OO
I/O
ARX
AR
SRIM
N4SID
I/O
OO
N4SID N4SID
ERA-NExT-AVG
1.2 Project Objectives
Although SITM is already in a working state, the current challenge is the optimization of
the software and the development of SITM GUI, a graphical user interface (GUI) that
will enhance the usability, speed, reliance, and simplicity of the toolbox. Equipping a
program with an effective GUI will save the user a considerable amount of time and
money (Galitz 2002). MathWorks has published an online manual to help programmers
develop GUIs for MATLAB (MathWorks 2009).
The System Identification Toolbox for MATLAB will first be tested within the civil
engineering department at Lehigh University. Any criticisms and/or suggestions will be
considered for SITM 2.0, the second version of the toolbox. At that point, SITM may be
released to a larger user pool. Ideally, SITM will serve as a tool for both novice and
experienced engineers, alike, to explore the topics of structural health monitoring and
system identification. Ultimately, the goal for SITM to become a leader in structural
health monitoring.
5
2
2.1
Methods
Content
The content required for inclusion in the GUI was clearly defined from the beginning of
the project. In fact, SITM already technically had a GUI (Figure 1) before the official GUI
project began in June 2011.
Figure 1: Original SITM GUI with a question/answer format displayed directly in the
MATLAB command window.
Before work began on SITM GUI, it was known that the program would have to prompt
the user for the following information:
· Data type
· Data files
· Geometric information, response direction
· System identification method
· Sampling frequency
· Filtering method, parameters
· Model order information
· Stabilization parameters
· Mode shapes to display
It was also known that the program would display (a):
· Stabilization diagram
· Power spectral density (PSD) diagram
· Mode shape plots
6
Given this information, the challenge became designing a user-friendly layout that met
all requirements in the most simplistic and efficient way possible.
2.2
Layout
When SITM is launched, the user must choose either to load a previous system
identification result or to begin a new session. This option is presented in the welcome
window (Figure 2), which also displays the program title, developer information, and
sponsorship acknowledgements.
Figure 2: Welcome window that displays when SITM is launched from the MATLAB
command window.
The entire input (pre-processing) procedure is displayed in one window (Figure 3) to
allow users to better anticipate and review required information and responses.
Panels (displayed as cells with borders) organize the pre-processing window. The input
information appears in the same order that SITM stores and calls the data, which
reflects the most logical flow of thought. Although it is not desirable to have black space
in a GUI, this layout still embodies the most simplistic input procedure. Additionally,
7
Figure 3: SITM GUI pre-processing window that is displayed when New Session is
selected from the welcome screen.
SITM GUI 2.0 is expected to possess new capabilities, i.e. an image-based method of
defining user geometries; therefore, this blank space may be filled at a later time without
having to change the entire layout of the GUI.
The post-processing procedure is also entirely housed within its own window (Figure 4).
This way, the user can define stabilization parameters, view the stabilization diagram,
select (frequency, model order) pairs from the stabilization diagram, and view the
respective mode shape plots in the same window.
Pushbuttons, labeled Open in new window, appear in the upper, left-hand corner of the
stabilization diagram and Mode Shapes panel once plotting is complete. These buttons
open the respective object in a new window the same size as the post-processing
window. This makes the object easier to read, and also allows the user to save only the
desired object as a .fig file.
8
Figure 4: Post-processing window that displays either (1) after loading previous system
identification results, or (2) after the system identification process is completed during a
new session.
2.3 Coding
In order to simplify interaction between the core code and the graphical user interface,
SITM GUI was also developed within MATLAB. All SITM GUI code was prepared from
scratch, without using MATLAB’s open layout GUI editor, GUIDE. It took five weeks to
finish the SITM GUI first draft. SITM GUI is imbedded within the 19 SITM (.m) files
and communicates with the original code by passing variables between functions. The
SITM GUI window size is set to 900 x 600 pixels, which should accommodate all
desktop and laptop screen sizes. All objects are placed and sized in the window (using
the lower, left corner of the object as the origin) by assigning the [x-coordinate, ycoordinate, height, width] in pixels. Table 2 describes user interface objects used in
SITM GUI. Objects have customizable properties, i.e. font size, font name, horizontal
alignment, background color, position, etc. that may vary depending on object type.
9
Table 2: Describes MATLAB user interface objects used in SITM GUI. Note that
MATLAB offers more user interface objects than are shown in this table. (MathWorks
2009)
Object
Function
uipanel
groups objects, user can interact directly with interface controls
uibuttongroup
groups buttons, exclusive selection for radio buttons and toggle
buttons that it contains
uicontrol
creates user interface control object, i.e. pushbutton, radio
button, slider, editable text, static text
Some sample lines of code are shown below to demonstrate how objects are created and
properties assigned.
# Creates Filtering Options button group that is sized and positioned
# in terms of pixels. The title is displayed in Helvetica font, and
# the border is etched out, 1 pixel wide, and black in color. The
# visibility is set to ‘off’ in order to force all objects to appear
# at once at the end of the script. The ‘SelectionChangeFcn’ property
# commands the interface to perform certain actions, depending on
# which radio button is selected.
filtering_BG = uibuttongroup('Units', 'Pixels',...
'Position',[15 125 200 100],'Title','Filtering Options',...
'FontName','Helvetica',...
'BorderType','etchedout','ForegroundColor','Black',...
'ShadowColor','Black',...
'BackgroundColor',[1 1 1],'BorderType','etchedout',...
'BorderWidth',1,'Visible','off',...
'SelectionChangeFcn',@highlight_filtering_fn);
# Creates a radio button that is sized and positioned in terms of
# pixels. The button string, ‘Filter Off’, appears in 10 point,
# Helvetica font, and is left-aligned in front of a white background.
# This radio button is assigned to filtering_BG, and is tagged ‘off’
# for future reference in the @highlight_filtering_fn.
input_info.filtering_off_RB = uicontrol('Style','Radio',...
'Position',[10 65 100 17.5],...
'FontName','Helvetica','FontSize'10,...
'HorizontalAlignment','Left',...
'BackgroundColor',[1 1 1],...
'String','Filter Off','Parent',filtering_BG,...
'Tag','off';
10
Each system identification method also had to be individually programmed into SITM.
Figure 5 illustrates the computational process behind the Eigensystem Realization
Algorithm (ERA) method. The other system identification methods follow the same
basic idea, but include their own customizations.
Figure 5: Flowchart illustrating the computational process behind the Eigensystem
Realization Algorithm (ERA) method, which is one of the system identification methods
available in the System Identification Toolbox for MATLAB.
11
2.4
Testing SITM GUI Performance
In order to ensure that all functions were properly adapted, SITM GUI was tested
against the original SITM code (which has already been extensively tested) any time an
major update was applied. These tests consisted of examination and comparison of
result files to make sure the files were equal. Development resumed only after it was
confirmed that the program was working properly.
2.5
Usability Testing
A meeting of 15 civil engineering graduate students at Lehigh University was called to
examine the usability of SITM GUI. These potential users were given a demonstration of
SITM GUI and each student was then verbally presented with the following questions:
· Do you think SITM GUI allows you to perform necessary functions?
· Are you more likely to use the new version of SITM than the older version of SITM?
· Do you believe that the features of the new version of SITM are relevant to the
program’s purpose?
· Would you say that SITM GUI has made SITM more user-friendly?
2.6
Documentation
The 30-page user guide, instructing users on how to use SITM, was prepared in Apple
Pages. The table of contents is shown in Table 3.
Table 3: System Identification Toolbox for MATLAB User Guide table of contents.
Topic
Page
Introduction
4
Getting Started
6
Using SITM
14
Interpreting Results
21
Troubleshooting
25
Appendix
28
References
29
The content and explanation techniques used in the SITM User Guide are loosely based
off of the MathWorks (2009) online help documentation.
12
2.7
SITM User Process
The program is launched by typing ‘SITM’ in the MATLAB command window. Upon
launch, the SITM welcome window will appear and prompt the user to choose either to
load a previous system identification result (.mat file) or to begin a new session.
The pre-processing window, as shown in Figure 3, contains seven panels: (1) Data Type,
(2) Geometric Information, (3) Response Direction, (4) SI Method, (5) Sampling
Frequency, (6) Filtering Options, and (7) Model Order Options. The Data Type panel is
where users can specify whether they would like to process input and output data files or
an output data file only. If the Output Only System radio button is selected, the Get
Input Data File pushbutton and its editable text box will disappear, since no input data
file is required in this case. When either the Get Output Data File or Get Input Data File
pushbutton is selected, a browser window will appear where the user can select a data
file containing input/output information that should be stored in a .dat file. The file
name will automatically appear in the editable text boxes upon selection to verify that
the correct file was selected. Since the usable methods depend on whether the system is
input/output or output only, the system identification method options in the SI Method
panel automatically change to reflect the current selection in the Data Type panel. If the
user selects Process without having selected an input and/or output file, an error box
will appear and SITM will not proceed until the required files have been selected.
Within the Geometric Information panel, the user can select the structural geometry
that best describes their system. The user-defined geometry information is stored within
three editable text files that define connectivity, node information, and sensor location
information. The Response Direction panel is only visible when User-Defined is
selected, because the response directions are already set for simple shear structures and
simple bridge systems. Future plans include the creation of an image-based method of
defining new geometries.
The SI Method panel houses the system identification methods that reflect the current
data type selection. When Input/Output System is selected the SI Method panel will
display the following system identification method options: ERA-OKID, ERA, ARX,
SRIM, and N4SID. When Output Only System is selected, the SI Method panel will
display the following system identification method options: ERA-OKID, ERA-NExT,
ERA-NExT-AVG, AR, and N4SID.
The Sampling Frequency panel contains an editable text box, where the user can input
the sampling frequency at which the sensors collected the selected data. If Input PSD is
selected, a power spectral density diagram will appear within the pre-processing
window. If the user selects Process without having entered a sampling frequency, an
error box will appear and SITM will not proceed until a sampling frequency is entered.
Note that an output file must have already been selected in order for a PSD diagram to
appear.
13
SITM’s Filtering Options panel allows the user to choose whether or not they would like
to filter their data and which method they would like to use to do so. If Filter Off is
selected, the radio buttons in the second and third columns will be invisible. If Filter On
is selected, SITM GUI displays the second and third columns that contain the filtering
options and filtering parameters, respectively. Alternating between filtering methods in
the second column will cause objects in the third column to appear and disappear,
depending on what information is required for that filtering method.
If the user selects Process without having entered a cutoff frequency, filtering order, or
amplitude loss value, an error message will appear. SITM will not proceed until a valid
value has been entered for each filtering parameter. The cutoff frequency must not
exceed half of the current sampling frequency value; filtering order and amplitude loss
must be a positive integers. The default cutoff frequency, filtering order, and amplitude
loss values, specific to the selected filtering method, will automatically appear in the
editable text boxes.
The Model Order Options panel allows users to define the y-axis of the stabilization
diagram that will appear in the post-processing window. The user should keep in mind
that increasing the number of model order values to be processed will increase the time
required to complete the computation. Additionally, higher model orders take longer to
process than do lower model orders. The minimum model order may not exceed the
maximum model order, and the increment must divide evenly into the difference
between the maximum and minimum model orders. If the user selects Process without
having entered valid maximum and minimum model order and increment values, an
error message will appear, and SITM will not proceed until the user fixes the error.
Selecting Process will begin the system identification process. Once the process is
complete, a browser window will appear, prompting the user to name the .mat file that
will store the workspace variables. The user should choose a descriptive name in order
to easily recall project details. The user can load these results at a later time by selecting
Load Previous in the welcome window. After the user saves the workspace variables, a
window will appear where the user may choose either to continue to the post-processing
procedure or to quit SITM.
The post-processing window contains 3 panels: (1) Stabilization Parameters, (2) Mode
Shape Options, and (3) Mode Shapes. The first panel houses editable text boxes, where
users can enter stabilization parameters, including convergence thresholds for
Frequency, Modal Assurance Criteria (MAC), and Damping Ratio. The user may also
enter the minimum and maximum values for the x-axis of the stabilization diagram in
the editable text boxes Min. Frequency and Max Frequency, respectively. When See Plot
is selected, a stabilization diagram reflecting the values inputted by the user will appear
in the black space to the right of the Stabilization Parameters panel. The Frequency,
MAC, and Damping Ratio values must all be between 0 and 1. The Max Frequency must
be greater than the Min. Frequency, and the Max Frequency must not exceed the
Filtering Frequency defined in the pre-processing window. If the user selects See Plot
14
without having entered valid stabilization parameters, an error box will appear and
SITM will not proceed until the user has fixed the error.
As mentioned before, a pushbutton will appear in the upper, left-hand corner of the
stabilization diagram, labeled Open in new window. This button will immediately open
the stabilization diagram in a new window the same size as the post-processing window.
This makes the diagram easier to read, and also allows the user to save only the
stabilization diagram as a .fig file.
The Mode Shape Options panel is where users can select which mode shape plots they
wish to view. The user may choose between three options: (1) view all mode shapes at a
specific frequency, (2) view all mode shapes at a specific model order, and (3) select
points from the stabilization diagram and view their mode shape plots. If a pushbutton
is selected before a valid value is entered into either of the editable text boxes, an error
box will appear and SITM will not proceed until the user has corrected the error.
The final panel, Mode Shapes, is where mode shape plots will appear after the user has
selected a mode shape option. As previously mentioned, a pushbutton will appear in the
upper, left-hand corner of the Mode Shapes panel, labeled Open in new window. This
button will immediately open the mode shape plots in a new window the same size as
the post-processing window, just as is possible with the stabilization diagram. Again,
this makes the plots easier to read, and also allows the user to save only the mode shape
plots as a .fig file. If more mode shape plots appear than can fit in the window, a scroll
bar will automatically appear to simplify browsing.
15
3
3.1
Results
Functionality Confirmation
This project successfully produced a working system identification program (SITM),
complete with a functional GUI. Please see Figures 1-3 for screenshots of the final SITM
product. All functionality testing confirmed that the new version of SITM is 100%
consistent with the original version in producing results.
3.2
User Feedback
Of the 15 potential SITM users polled, 100% answered “yes” to all of the questions
mentioned in the Methods section. The students also verbally asserted that the current
version of SITM (with SITM GUI) is much more versatile, functional, and reliable than
the original version. Suggestions were made to add an image-based method of defining
user geometries, which is planned for inclusion in SITM GUI 2.0.
16
4
Conclusion
Computer programs are most effective when they possess a user-friendly GUI. MATLAB
users can create GUIs for programs that they write, by either using MATLAB’s GUI
Layout Editor (GUIDE) or writing code from scratch.
The System Identification Toolbox for MATLAB, accompanied with SITM GUI, is an
efficient MATLAB program that simplifies the system identification process and allows
for quick comparison of methodology. If used to track changes in modal parameters,
SITM can be used as a tool to monitor structural health.
The System Identification Toolbox for MATLAB should be available to a wider user pool
by 2012.
17
5
References
1. Akyildiz, I. F., Su, W., Sankarasubramaniam, Y., and Cayirci, E. (2002). “Wireless
Sensor Networks: A Survey.” Computer Networks Elsevier Journal, Vol. 38, No. 4,
393 - 422.
2. Chang, M. (2011) “Modal Identification Using SITM,” Ph.D. thesis, Civil Engineering
Dept., Lehigh University, Bethlehem, Pennsylvania.
3.Chang, M., and Pakzad, S. N. (2011). “Modified Natural Excitation Technique for
Stochastic Modal Identification.” Journal of Structural Engineering, In Review.
4. Dorvash, S., Pakzad, S. N., Labuz, E. L., Chang, M., Li, X., and Cheng, L. (2010)
“Validation of a wireless sensor network using local damage detection algorithm for
beam-column connections.” Proceedings of the SPIE Sensors and Smart Structures
Technologies, San Diego, California.
5. Galitz, W. O. (2002). The Essential Guide to User Interface Design: An Introduction
to GUI Design Principles and Techniques, Wiley, New York.
6. Juang, J. N., and Pappa, R. S. (1985). “An eigensystem realization algorithm for
modal parameter identification and model reduction.” Journal of Guidance, Control,
and Dynamics, 8: 620-627.
7. MathWorks, Inc. (2009). “MATLAB 7 Getting Started Guide.”
<http://mathworks.com/access/helpdesk/help/pdf_doc/matlab/getstart.pdf>.
8. Pakzad, S. N., Fenves, G. L., Kim, S., Culler, D. E. (2008). “Design and
Implementation of Scalable Wireless Sensor Network for Structural Monitoring.”
Journal of Infrastructure Systems, March 2008.
9. Pakzad, S. N., Rocha, G. V., and Yu, B. (2010). “Distributed modal identification using
restricted auto regressive models.” International Journal of Systems Science, In
Press.
18
6
Acknowledgements
Thanks to the center for Advanced Technology for Large Structural Systems (ATLSS) at
Lehigh University for housing this research project during the summer of 2011. Thank
you to the National Science Foundation and the George E. Brown Jr. Network for
Earthquake Engineering Simulation for funding this project through grant
EEC-1005054 and creating a meaningful Research Experience for Undergraduates
program. I would like to offer my sincere thanks to Dr. Shamim N. Pakzad and Minwoo
Chang for their mentorship and also for allowing me to be creative with this project. Any
opinions, conclusions, or recommendations expressed here are my own and do not
necessarily reflect those of the sponsors.
19
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement