A collection of MATLAB scripts for processing and analyzing ultrasonic signals, including attenuation, dispersion, nonlinear parameters, time of flight, impedance estimation, and spectral analysis.
This toolbox provides functions for comprehensive ultrasonic signal analysis, particularly useful for material characterization and non-destructive testing applications.
- Frequency-dependent attenuation calculation
- Phase and group velocity dispersion analysis
- Nonlinear acoustic parameter estimation
- Time of flight measurement with enhanced precision
- Acoustic impedance estimation
- Detailed spectral analysis
Calculates frequency-dependent attenuation coefficients:
- Computes attenuation using frequency domain analysis
- Returns both average attenuation (Np/m/MHz) and frequency-dependent array
- Implements power law model fitting with outlier removal
- Uses median absolute deviation for robust analysis
Analyzes wave dispersion characteristics:
- Calculates phase velocity, group velocity, and dispersion
- Uses unwrapped phase for accurate velocity calculations
- Implements Savitzky-Golay filtering for phase derivatives
- Provides robust median-based results in valid frequency ranges
Evaluates nonlinear acoustic parameters:
- Computes second-order nonlinearity parameter β
- Calculates Total Harmonic Distortion (THD)
- Measures second and third harmonic ratios
- Useful for material microstructure characterization
High-precision time-of-flight measurement:
- Uses enhanced cross-correlation with sub-sample precision
- Implements dual-method validation (envelope and phase correlation)
- Provides confidence metrics based on correlation and SNR
- Applies windowing for improved edge handling
Acoustic impedance estimation:
- Calculates impedance from transmission coefficients
- Assumes water/gel coupling medium (Z ≈ 1.5 MRayls)
- Includes fallback estimation using velocity
- Returns results in MRayls
Comprehensive spectral analysis:
- Calculates center frequency and bandwidth
- Computes spectral moments and features
- Provides spectral entropy and rolloff metrics
- Uses Welch's method for power spectral density
Each function requires transmitted and received signals as inputs. Additional parameters may include:
thickness
: Material thickness for attenuation and dispersion calculationsvelocity
: Sound velocity for impedance estimationsamplingRate
: Sampling frequency of the signalsfrequencyRange
: Valid frequency range for analysis
Example:
% Calculate attenuation
[attenuation, freqDepAtten] = calculateAttenuation(obj, txSignal, rxSignal, thickness);
% Perform spectral analysis
[centerFreq, bandwidth, spectralFeatures] = spectralAnalysis(obj, txSignal, rxSignal);
- MATLAB with Signal Processing Toolbox
- Input signals should be time-aligned and properly sampled
- Signals should have adequate SNR for reliable analysis
- All functions include robust error handling and outlier removal
- Results are validated using multiple methods where applicable
- Frequency ranges should be set appropriate to transducer characteristics
- Window functions are applied to minimize edge effects
Feel free to contribute to this project by submitting issues or pull requests. Please ensure any modifications maintain the robust error handling and validation present in the current implementation.