Skip to content

Repository files navigation

Modified-Transient-Peak-Ratio

Estimate the equivalent 2nd-order characteristics using crest/trough state data of an oscillatory system.

Transient Peak Ratio Method is a reduction method used to estimate equivalent 2nd-order characteristics of a system whose damping ratio lies between -0.5 and 0.5.

Modified Transient Peak Ratio Method (brief)

It is a data reduction method that finds the 2nd-order characteristics of a system whose damping ratio lies between -0.5 and 0.5. The data is an oscillatory wave (growing or decaying amplitude).

Ratios of successive crest/trough amplitude steps are formed, averaged, and matched to the chart in sources [1] and [2] via a fitted curve to obtain the damping ratio. That damping ratio is then used to compute natural frequency.

Method Parameters

Method Parameters (image from reference [1])

Important: The chart only shows positive damping ratios explicitly. Negative values are estimated by extending the same exponential fit past the y-axis. Keep that in mind for dynamically unstable (diverging) records.

Files

File Purpose
ModifiedTransientPeakRatio.m Main method: load/accept data, plot, estimate T / ζ / ωn
loadPeakData.m Load peak data from CSV, Excel, text, or MAT
example_peak_data.csv Sample 2-row CSV (timestamps + amplitudes)
test_ModifiedTransientPeakRatio.m Automated smoke tests

Input formats

Crest and trough samples only (not the full time history).

Preferred CSV (two rows) — timestamps in row 1, amplitudes in row 2:

0,0.5,1.0,1.5,2.0,2.5,3.0,3.5
10.00,-8.20,6.72,-5.51,4.52,-3.71,3.04,-2.49

Also accepted

  • N×2 columns: time,amplitude (optional header row)
  • Excel (.xlsx / .xls) with the same layouts
  • Text (.txt / .dat) with comma, semicolon, tab, or space delimiters
  • MAT (.mat) containing a numeric Data / data array (or first numeric variable)
  • A numeric array passed directly in MATLAB/Octave

How to run

In MATLAB or Octave, from this folder:

% From the example CSV (plots input data, then prints results)
results = ModifiedTransientPeakRatio('example_peak_data.csv');

% From any supported file
results = ModifiedTransientPeakRatio('path/to/your_data.xlsx');

% From an N-by-2 array [time, amplitude]
results = ModifiedTransientPeakRatio([0 150; 1 130; 2 160; 3 120]);

% From a 2-by-N array (row 1 = time, row 2 = amplitude)
results = ModifiedTransientPeakRatio([0 1 2 3; 150 130 160 120]);

% Interactive: file picker (GUI) or paste / path prompt
results = ModifiedTransientPeakRatio();

Output fields: TimePeriod, FrequencyHz, FrequencyRad, DampingRatio, NaturalFreqRad, TPRfinal, Data.

How to test

Requirements: MATLAB or GNU Octave (for Excel on Octave, install the io package).

From the repository root:

# GNU Octave (CLI)
octave --no-gui --eval "test_ModifiedTransientPeakRatio"

# MATLAB
matlab -batch "test_ModifiedTransientPeakRatio"

Or inside the MATLAB/Octave command window:

cd('path/to/Modified-Transient-Peak-Ratio')
test_ModifiedTransientPeakRatio

What the test checks:

  1. example_peak_data.csv loads as an 8×2 [time, amplitude] matrix
  2. Column-oriented CSV with a header loads correctly
  3. Array input and CSV input produce the same T / ζ / TPR (expected T = 1 s for the example)
  4. Classic N×2 array path still works
  5. Fewer than 3 samples is rejected

You should see [PASS] lines and All tests passed.

Quick manual check of the example file only:

ModifiedTransientPeakRatio('example_peak_data.csv')

A figure of the crest/trough samples should appear, followed by printed time period, damping ratio, and natural frequency.

References

[1] Appendix of Background Information and User Guide for MIL-F-8785B(ASG) "Military Specification—Flying Qualities of Piloted Airplanes" by C. R. Chalk

[2] Introduction to Flight Test Engineering by Ward and Strganac

About

Estimate the equivalent 2nd order characteristics using state data of an oscillatory system

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages