Upload
brad-carman
View
2.009
Download
3
Tags:
Embed Size (px)
Citation preview
1
Getting Organized: Data Management for MathCAD
Bradley CarmanJune 2012
2
Introduction
MathCAD is the ideal tool for data analysis
Not ideal for data storage and management
A tool is needed for Data Management
Started with Excel Add-in, Evolved to full application (SciData)
Data Management
3
Applied Example: Drag Coefficient Measurement for Parachute
Parachutes A-D dropped from 100m elevation
Velocity measured every 0.5s for 5s
100kg mass attached to each parachute
Goal is to determine the Drag Coefficient: Cv
Ac=1.5m2
A B
C D
Ac=1.75m2
Ac=1.4m2
Ac=2m2
4
Data Analysis – The Current Way
MathCAD easily provides the Data Analysis for this problemPlotting, Curve Fitting, etc.
But, current data import is “Hard Coded”
1. Hard Coded Data Input and Characteristic Values
2. Analysis & Results
5
Data Analysis – The Current Way
Problems:
Slow to change out data sets
No link between characteristic values and data sets
Changing data sets often leads to separate MathCAD files = tendency for errors
6
Data Analysis – The New Way
Replace hard coded data and characteristic values with variables
Feed the variables data from database using the MathCAD API
Analysis & Results remain exactly the same!
1. Variable Data Input/Characteristic Values
2. Analysis & Results
7
Data Analysis – The New Way
Result:
Single MathCAD document and analysis
Quickly change out data sets
Data and characteristic values can be linked
8
Separating Data from Analysis - Implemented
Real benefit now comes from a Data Management System as the driver of inputs and outputs of the analysis
Now it is possible to Batch Process all data sets!
Retrieved Results
Send to MathCAD
Data Management System
Data
Characteristic Values
Results
Data
Characteristic Values
Results
Data
Characteristic Values
Results
Data
Characteristic Values
Results
9
Demonstration: Using SciData as the Data Management System
Data is organized in a table
Each row contains a data set, characteristic values, and results
Data
Characteristic Values
Results
10
Step 1: Importing Data
Data files use SDS Standard
11
Step 2: Categorize the Data Set
12
Step 3: Add Characteristic Values to the Data Set
13
Step 4: Link to MathCAD Analysis File
14
Step 5: Execute the Link
15
Step 6: Setup Inputs and Outputs
# = Result tag
Note: Results are retrieved by file due to bugs with MathCAD API. WRITEPRN is much faster.
16
Step 6: Setup Outputs Continued…
17
Step 7: Batch Processing
18
Step 8: Compile Results
All results are now compiled together and ready to be presented
Since everything came from the same MathCAD analysis, there are no discrepancies among results
Fast, organized, and error free!
Parachute Ax CvA 1.5 1.48B 1.75 2.34C 2 2.59D 1.4 1.84
19
Conclusion
Data and Analysis are now separate:
-Now have a good place to store and organize data and information
-Enabling batch processing
-Improving efficiency and accuracy!
sourceforge.net/projects/scidata/
20
Additional Examples
Design Table
Full Table Analysis
Table Filter
Data Extraction
High Speed Video Analysis
21
Parachute Design Table
22
Full Table Analysis
23
Table Filter
24
Data Extraction
When SciData cannot interpret a data file, only the file name is added
Use MathCAD to interpret and filter more complex data files, then export to SciData
First challenge: Building a path to the file using the name
Building a relative path Best practice
25
Data Extraction
Handling different data formats
26
Data Extraction
Use READFILE or READPRN
Don’t Use Import>Data>…
Problem: - Can’t use variable path
Problem: - Can’t use relative path ‘..\..\Data\’- Has bugs (problems updating)
27
Data Extraction
READPRN can filter out all non-numeric information automatically.
28
Data Extraction
1. Data Extraction File
2. Extract to SciData
3. Add Clean Analysis File
4. Start with a Clean Slate
29
High Speed Video Drop Analysis
1. In DOS run: ren *.bmp *.bmp.dat
2. Scan Data folder
3. Batch Process, get dropPositionX
4. Full Table Analysis
30
Review
Data Management for MathCAD SciData can be downloaded at:
– sourceforge.net/projects/scidata/
Data Management benefits:– Organization and error avoidance– All data types stored conveniently together in a standardized form (metadata and arrays)– Batch Processing– Row by Row and Full Table Analysis from the same root source
Contact Info– Brad Carman– [email protected]
Questions?– Remember your evaluations