How to shift curves and select appropriate peak y-axis values

2 次查看(过去 30 天)
I have curves of experimental data (imported from spreadsheets) for which I have to compute the max y-axis values and the delta time on the x-axis. For each test condition I have perfomed at least 3 experiments.
1) The first problem is that while the peak values and the delta times are similar, the curves have a time shift (i.e. the Y-axis peak is occurring earlier or later), so I cannot simply compute the average in Excel, since this time-shift would affect the mean values and delta time computation (e.g. the curves would look "wider").
I know how to import the spreadsheets data, but how can organize the data in Matlab in order to avoid the effect of the time shift?
2) Then the second problem is due to the fact that the Y-axis peak is not always on the one that I am looking for, but sometimes it just occurs at the beginning of the experiment, while I am looking at a later time peak value. How can I select it? Note that the starting Y-values are sometimes smaller than zero.
I am attaching a sample Excel file with numerical test results.
And here I am also attaching a figure for one single test result to be more clear.

回答(1 个)

Greg Dionne
Greg Dionne 2016-6-29
If you have a relatively recent copy of the Signal Processing Toolbox, have a look at the function "findpeaks". Try setting the 'MinPeakProminence' to something like 20, and 'MinPeakWidth' to something like 1e-5 (if you use a time vector) or maybe 50 samples or so. That should give you the location of the peak.
To get the value of the DC location of the signal in the pre-event area, you could try finding the median value in the region immediately preceding the peak.
Once you have that you can use "find" to find the first occurrence where it jumps from the median value + some threshold.
  1 个评论
Quong Axxong
Quong Axxong 2016-6-30
Thank you for your answer. I have Singal Processing Toolbox 7.1.
I will follow your suggestion to find the peaks. Any idea how to find the rise time, that is the delta x in the picture I have posted?
I have data similar to the ones that I have attached coming from an oscilloscope. I have to find ways how to properly connect it directly to Matlab so that I can avoid working on Excel.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by