Figure 1- ICalc GUI
Introduction
The software called ICalc
enables analysis of automobile crash test data, but differs from commercial software in its ability to automatically graph and apply injury criteria from crash test dummy sensors and generate reports. A complete set of crash test data can be graphed with injury criteria and an engineering report generated in minutes. Standard calculations and algorithms are based on Society of Automotive Engineers (SAE) publications J1727 and J211-1. The National Highway Traffic Safety Administration (NHTSA) Injury Assessment Reference Value (IARV) standards and other IARV standards are easily selected from the menu and automatically applied to the appropriate crash test dummy sensor channels. Sensor channel identification is based on the ISO code (International Organization for Standardization - 13499 Annex B publication) which specifies a sixteen character naming code. The standard calculations for dwell curves, resultants, duration clips, head and neck injury criteria, and others, are included for graphing and ease of analysis. The software is written in the C# language for the Microsoft .NET® 4.0 framework and the download includes the complete project for Microsoft Visual Studio® 2010. The report generation has been implemented and tested with Microsoft Word® 2013. The libraries used for H5 file access are provided, thanks to the HDF Group (HDF5 Library - version HDF5DotNet-Net4.0-x86_64 dated 7/8/2016). The Butterworth filter was converted to C# from a Microsoft Visual Basic For Applications version written by Sam Van Wassenbergh of the University of Antwerp (see article: Butterworth Filter in C#). The Fast Fourier Transform (FFT) code is compliments of the Microsoft Developer Network (see FFTLibrary). The software also includes a detailed user manual (ICalcHelp.chm) where each menu function is explained as well as a table of contents and index.
Software Overview
ICalc
can read exported data files from commonly used data acquisition software used for crash testing (various types of CSV, TSV, UNF, and H5 files). There are several options to save data or graphs to standard formats, or by use of the clipboard (copy and paste) to another application. It automatically zeroes (bias corrects) data, converts to SI (International System) units, and applies the standard Channel Frequency Class (CFC) filter for the channel type. Filtering may be done by a fourth order zero-phase shift Butterworth low-pass filter or by a Fast Fourier Transform (FFT) based filter.
Functions are available for inverting and scaling the data, integrating accelerometer data to velocity and displacement, and differentiation of displacement and velocity data. Relative data channel differences can be calculated, as well as relative velocity and displacement. Various other types of data functions are provided such as: converting units, calculating the coefficient of variation, and converting data to the frequency domain by FFT.
As a data file is opened, all the channels are read-in and listed in the application window’s left pane (see Figure 1). Multiple data files may be opened at a time to directly compare graphs from multiple crash tests. Due to the large data sets that may be encountered, memory is conserved by only loading data into memory as needed. The sensor channels listed in the left pane may be selected by a mouse left-click, or multiple channels can be selected by the usual Windows ctrl-click, or shift-click functions, or all the channels may be selected by clicking on the root file name (or ctrl-a). Hovering the cursor over the file name or channel name will show a tooltip with more detailed information about the file or sensor channel (e.g., ISO code, description, crash test dummy type, data units, number of data points, sampling frequency, time range, associated IARVs, etc.)
The application’s right pane is a tab control which will display the graphs using the MSChart control (for more information, see article: An MSChart Class for Graphing Line Series). As graphs are added, a new tab is added for each graph so that the user can select a tab for viewing. Channels may be selected for graphing one at a time, or multiple channels may be selected for graphing comparisons. Channels from more than one file can be loaded together also, which allows for selecting channels from different tests to be graphed together for comparison. The sensor channel’s full time range is graphed by default, or the time range can be adjusted to focus in a narrower range of interest, or the graph may be interactively zoomed (click+drag). Data minimums and maximums are displayed on the graphs, as well as IARV information. There are options to edit graph titles, axes, colors, etc. Graphs may be printed, saved to an image file or data file, or copy/pasted as an image or data to another application (e.g. Excel, Word).
Some tests include more than one crash test dummy and may have many other sensors for test apparatus (e.g., chassis accelerometers, seat accelerometers, etc.). Data acquisition software usually exports data channels in the order they are found or initialized, so channels may not be read-in from the data file in an orderly manner. ICalc
offers sorting operations to make it easier to find and select channels. Channels can be listed by ISO code or description name, and sorted anatomically (head to foot), by sensor type (accelerometers, force sensors, moment sensors, etc.), and axis (x, y, z). Besides the two character crash test dummy type ISO code (position 11-12, e.g. H3), a specific crash test dummy (e.g. driver, passenger) may sometimes be identified by the first two characters in the ISO code, and so a sort option can also delineate these to keep them listed separately. The sort can also be turned off so that the channels are listed in the order they are found in the data file for when direct comparisons must be made to the data file.
Channel Identification and the IARV
Since ICalc
applies many types of operations automatically, it is important to accurately identify the sensor channel type in order to apply the appropriate operations. As mentioned above, identification is based on the ISO 13499 Annex B publication which specifies a sixteen character naming code. ISO codes are read from the data file, if supplied, but if part of the ISO code is missing (i.e., ‘0
’), the software will attempt to generate the missing code(s) based on channel information found in the file header. There are also options to manually edit the ISO code.
IARVs are read in from a specially formatted text file so that the software can quickly search and apply the appropriate values based on the crash test dummy type, anatomic region (head, neck, etc.), sensor type (accelerometer, force, moment, etc.), and axis (x, y, z, radial, etc.) as found in the channel’s ISO code. Thus the information in the IARV file dictates how the IARVs are applied to the data for a specific sensor channel based on its ISO code. Since there are various IARV standards (e.g. frontal impact, rollover, etc.) and numerous crash test dummy types, the IARV menu is dynamically loaded at run-time by reading the menu directives in the IARV file, and users may tailor the IARV file to the user’s crash test types and IARV standards of interest. Since the IARVs are stored in an external file, changes may be made to the file without the need to recompile the software.
Since IARVs are specified by channel type, the IARV file specifies which IARV to match to a channel based on the ISO code. Zeroes (‘0’) in the ISO code are considered as matching any character for that code position. Channels that have IARVs associated with them are listed in the application’s left pane in red font for easy identification (see Figure 1). As mentioned, the IARV standard may be selected from a menu and if a different IARV standard is chosen, the IARVs are searched again and the channel listing is automatically updated.
Figure 2 - A section of the IARV file showing NHTSA IARVs
Since the IARVs are associated with a channel, when a channel or group of channels is selected to be graphed, the pertinent IARV can be graphed automatically. Multi-channel IARVs may also be graphed automatically. For example, the Head Injury Criteria (HIC) SAE standard calculation requires that the resultant of three specific x, y, and z head accelerometer channels be calculated, and the software is able to select the appropriate channels, calculate the resultant, and automatically generate the graph. Another example is the SAE standard Neck Injury calculation (Nij), that requires three specific neck channels; two force channels (FOX, FOZ), and a moment channel (MOY), and all three need to be filtered at the same CFC for this calculation (NHTSA also distinguishes different Nij IARVs for upper and lower neck). The CFC filter applied for Nij can be a point of error because the two force channels are normally filtered at CFC 1000, and the moment channel at CFC 600, but the SAE Nij specification requires that all three channels be filtered at the same CFC (600 for NHTSA). So, for example, if the force channels were already filtered at CFC 1000, then they need to be re-filtered at CFC 600 for the Nij calculation. The software handles the channel selection, filtering, and graphing automatically.
Scripts
Besides being used interactively, the software includes certain “scripts” for automatically generating a series of calculations and graphs. Instead of interactively selecting each sensor channel, or set of channels, for a calculation and graph, the script handles the selections. This ability is due to the way the Graph
function handles all the decision making for what graph(s) will be produced from the selected channel(s). Since each channel’s data structure carries IARV information, the Graph
function interprets if the IARV is a type that can be graphed singly with only the current channel’s data, or requires additional channels (e.g., HIC, Nij, resultant clips). If other channels are required prior to graphing, then it determines that the channel’s data must be temporarily stored, and the operation delayed, until the other needed channels are accessed. The Graph
function handles this by an outer loop that loops though each of the selected channels, and an inner loop that loops though each IARV for the channel.
Currently, ICalc
provides four types of scripts: one does a “full report” type, which graphs all the selected channels individually; first without IARVs, then with IARVs, a second script graphs IARVs only, a third graphs channels without IARVs, and a fourth script graphs groups of channels together for comparison onto the same graph. The grouping script selects channels to be graphed together based on a user selected ISO code pattern. Channels with ISO codes that “match” the pattern are graphed together. This is useful for automatically generating a large number of comparison graphs. Currently, the scripts are “hard” coded into the application as a menu option (not user defined).
A script only runs on the channels selected by the user. Therefore, a user could select a subset of all the channels that pertain to a particular dummy, or just operate on certain chassis/seat channels, etc., and the script will only act on those channels. This gives more versatility in using scripts. The Graph
function doesn’t require separate handling for channels that were selected by a script instead of interactively by a user. It handles the script’s channel selections the same as the user’s channel selections. However, a script must produce the appropriate type graphs for that script. Therefore, if a set of unrelated channels is selected (e.g. the user selects all channels), the script must decide which channels to select at-a-time before passing control to the Graph
function, in order to produce the required graphs for that script type. It does this by temporarily storing the list of user selected channels, and then stepping through the list to decide which should be graphed together, and which singly, assembling a subgroup of channels, and then passing the subgroup to the Graph
function.
IARV Table and Bar Chart
Whenever IARVs are graphed, a table and bar chart are generated showing IARV summary information. The table lists each channel that was graphed with IARVs and shows the percent of IARV and the time (or duration) at which the maximum/minimum occurred (depending on whether the IARV is positive or negative). The percent of IARV column (%IARV) is colored red if greater than or equal to 100% of IARV, yellow if less than 100% but greater than or equal to 75%, and green if less than 75%. An example of an IARV table is shown in Figure 3. The IARV bar chart shown in Figure 4 shows much of the same information but in a graphical format. The bars are colored as in the table to indicate the percent of IARV reached. The table and bar chart are automatically generated when an IARV is graphed. As additional graphs are made that have IARVs, the IARV information is added to the table and bar chart.
Figure 3 - IARV table
Figure 4 - Summary IARV bar chart
Reports and Templates
A typical crash test dummy with sixty-five sensors may require about seventy pages to document into a full-style report (non-IARV graphs and IARV graphs - two graphs per pg.). Tests with multiple crash test dummies can multiply the page count proportionately. ICalc
’s report making capability will automatically generate a test report from all the graphs made in a session. The report assembles all the produced graphs, the IARV summary table, and IARV summary bar chart. These are automatically copied and formatted into a Microsoft Word® document that can be saved to file types: docx, xps, or Adobe PDF (if the version of Word supports this).
Report styles may be designed into a Microsoft Word® template file. Upon startup, ICalc
looks for Word® template (.dotx) files in its startup folder, and generates the Report menu dynamically, listing the template names that were found. If no template files are found, then a default report style menu option is shown. Templates are useful for customizing the appearance of a report, e.g., a design or logo can be placed in the header, and text fields may be formatted and positioned by using “bookmarks” (see article: Using Template Bookmarks for Automating Microsoft Word Reports). Bookmarks may be placed in the template to mark positions requiring user input (e.g., temperature, humidity, customer, test engineer, etc.). When a menu option (template) is selected, the software reads the template file looking for bookmarks. If bookmarks are found, a dialog is opened for user input with textboxes for each bookmark (see article: A Multipurpose Message Dialog). When bookmarks are designed into a template they must be named, and the name is used by ICalc
as the textbox label for a user prompt. The Microsoft Word® application is then opened using the selected template file and the user's typed-in text for each bookmark is inserted at the bookmark locations. All the current graphs are copied to the report, including the IARV table and IARV bar chart.
Using the Code
Some of the noteworthy classes and methods have been documented already in more detail in the article links noted above. An executable file set is provided for download as well as the complete Visual Studio® project and an example CSV data file. The source code is fairly well commented throughout. There is also a detailed user manual (see ICalcHelp.chm) included in the download with each menu function explained as well as a table of contents and index.
Conclusion
In conclusion, the ICalc
application is made available for download, which performs many functions for crash test data analysis and graphing, with automation of many functions. The software currently calculates the needed IARV types required for this work, but not all IARVs specified by SAE. If there is enough interest, updates may become available.