Skip to content
/ SCR Public

A MATLAB-based application for analyzing Single Cam Rig (SCR) test data

License

Notifications You must be signed in to change notification settings

a-dorgham/SCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB SQLite License

SCR Analysis Tool

A MATLAB-based application for analyzing Single Cam Rig (SCR) test data


The SCR Analysis Tool is a purpose-built MATLAB application designed to help researchers and engineers analyze experimental data collected from Single Cam Rig (SCR) tests. It provides an intuitive graphical interface for importing, visualizing, and processing torque, velocity, load, and shaft angle measurements. With built-in support for peak detection, data smoothing, curve fitting, and reporting, it offers a streamlined workflow for mechanical testing and analysis.


Key Features

  • Interactive MATLAB GUI with six dedicated plotting axes
  • Multi-file support for comparative batch analysis
  • Advanced data processing tools:
    • Savitzky-Golay filtering for customizable smoothing
    • Automated peak detection
    • Exponential curve fitting (with R² evaluation)
  • Detailed visualizations:
    • Raw vs. smoothed data comparison
    • Multiple torque correlation plots (vs. time, velocity, load, angle)
    • Error bars for statistical insights
  • Export capabilities:
    • Export processed data to Excel
    • Save high-resolution figures in TIFF format
  • Batch processing for handling multiple files at once

Project Structure

SCR_Analysis_Tool/
├── SCR_Analysis_v2b.m         # Main GUI application
├── /data/                     # (User-supplied) test data files
└── /export/                   # Output directory for figures and Excel files

Getting Started

Prerequisites

  • MATLAB R2020b or later
  • Windows OS with Microsoft Excel (required for export functionality)

Running the Application

  1. Add SCR_Analysis_v2b.m to your MATLAB path.

  2. In the MATLAB command window, run:

    SCR_Analysis_v2b

Usage Instructions

Load Data Files

  • Click "Load data..." to select one or more .txt files
  • Files must contain five tab-delimited columns:
    • Time (s)
    • Torque (N·m)
    • Velocity (rpm)
    • Load (N)
    • Shaft Angle (deg)

Select Analysis Options

  • Choose between:
    • Moving average (default)
    • Savitzky-Golay smoothing
  • Adjust filter parameters (degree, span) as needed

Analyze Data

  • Use the listbox to select specific files
  • Navigate between measurement intervals using the slider
  • Visual feedback is shown across six dedicated axes:
    1. Raw torque with detected peaks
    2. Raw vs. smoothed torque
    3. Torque vs. time (with optional curve fit)
    4. Torque vs. velocity (with error bars)
    5. Torque vs. load
    6. Torque vs. angle

Export Results

  • Export numerical outputs to Excel
  • Save publication-ready figures (TIFF format)

Data Format Requirements

Input files must be plain-text, tab-delimited, with this structure:

Time(s)    Torque(N·m)    Velocity(rpm)    Load(N)    ShaftAngle(deg)
0.000      1.234          100.0            50.0       0.0
0.001      1.245          100.1            50.1       0.5
...

Analysis Capabilities

Data Processing

  • Segmentation by changes in velocity
  • Peak detection in torque data
  • Custom smoothing with adjustable filters

Visualization & Statistical Tools

  • Mean and standard deviation calculations
  • Exponential regression fitting (R² > 0.5)
  • Error bars for grouped data analysis

Limitations

  • Only supports text files with exactly five columns
  • Filter settings may require adjustment for each dataset
  • May slow down with very large files or many simultaneous plots
  • Excel export requires a local Microsoft Excel installation

Screenshot

SCR Analysis Tool – Main Analysis Window GUI

RAW data after smoothing raw data

Analyzed data analyzed data


Roadmap

  • Add support for additional sensor inputs
  • Expand statistical toolset
  • Develop a web-accessible version for remote use
  • Integrate machine learning for automatic parameter tuning

License

This project is licensed under the MIT License.


Contact

For bug reports, feature requests, or collaboration:

About

A MATLAB-based application for analyzing Single Cam Rig (SCR) test data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages