+ Reply to Thread
Results 1 to 13 of 13

detecting steep rises and drops of data

  1. #1
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    detecting steep rises and drops of data

    Hi together,

    i have a big task for my bachelor thesis where I analyse running with the help of insoles detecting pressure.
    I am trying to figure out when a step starts and when a step ends.

    What I am trying to do is as they did in this study:

    "First, the start and end points of each step were selected using an automated procedure where the time instant immediately preceding a steep rise of the digital values was used to identify the start of the step. Similarly, the time instant immediately following a steep drop of the digital values was used to identify the end of the step. A steep rise or drop was defined as a change of more than 600 summed digital values per second."

    It doesnt necesarily have to be 600 digital values but I am sure that one can be changed quickly anyways.
    Upload of a excel sheet was not possible. So down below is one part of my data I want to use the described method.
    Any ideas?

    Thanks in advance and kind regards
    elvalo

    185.61877
    189.3098766
    187.996093
    237.5444776
    363.792764
    474.963832
    658.2678441
    920.4613964
    1123.472142
    1320.727293
    1471.124178
    1570.095804
    1655.366568
    1689.900309
    1691.90232
    1661.184771
    1618.01761
    1546.26003
    1463.929643
    1360.828904
    1216.688178
    1050.963819
    882.9247004
    684.6060761
    502.6784072
    363.7302075
    264.8836698
    198.694042
    193.5640306
    182.3655955
    168.8523942
    164.1603139
    157.7165218
    153.2121231
    151.5855336
    147.6441842
    144.3910106
    141.9511229
    141.1378296
    137.0713554
    135.6324514
    132.7546425
    128.7507351
    126.5610969
    128.4379295
    129.8768333
    131.7536672
    132.1290354
    133.5679389
    134.3812351
    135.1319678
    131.1280586
    120.993159
    110.9208238
    106.2913064
    103.4760526
    101.4115348
    101.7243395
    101.6617823
    101.7243436
    100.7233646
    100.4105593
    101.3489767
    105.2903248
    110.7957042
    118.1779074
    123.1202322
    135.2570909
    151.2727235
    159.030308
    166.224829
    172.4183752
    177.2981447
    180.6138749
    181.3020486
    186.8699881
    297.2903254
    446.3108544
    535.2101655
    703.3118281
    974.764417
    1220.441879
    1429.145642
    1568.469227
    1656.680325
    1703.538623
    1707.980425
    1668.629555
    1601.376394
    1514.291321
    1418.572836
    1304.023469
    1159.507303
    1017.99416
    813.0439654
    623.2336204
    442.8699947
    337.579666

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: detecting steep rises and drops of data

    HOW TO ATTACH YOUR SAMPLE WORKBOOK:

    Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Dismiss
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: detecting steep rises and drops of data

    Graphing the data using a line chart works well to visually spot when the steps start and stop.

  4. #4
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    Thanks, I did that, but I need the exact beginning and end data for further work

  5. #5
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    Ok nice my sheet is attached now
    Sorry, I am really new here...

    I would like to have the data marked in red

    The big diagramm shows the hole recorded sequence and the small one just rom the given data in the excel sheet
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: detecting steep rises and drops of data

    Try something like this (see attached workbook).

    I added a few helper columns:
    1) Change calculation
    2) Indication of whether the change was steep, depending on the value of cell I11
    3) Where the step starts
    4) Where the step ends
    5) Step #

    You can hide these columns if you choose.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: detecting steep rises and drops of data

    Where it's for a thesis, we probably need to be careful that we choose and algorithm and/or programming steps that can be documented in some way (I doubt "some random nobody(s) on the internet told me to do it this way" goes over very well when documenting or defending a thesis).

    Do you have a peak identification algorithm in mind? We are usually pretty good at programming a known algorithm into the spreadsheet, but not always knowledgeable in specific fields of study to know what algorithms apply to your specific project.

    I'm no expert in signal processing or peak identification, but I am aware of some principles of this kind of analysis. From what I have seen, peak identification in a signal may include:

    1) distance from baseline (which means needing a baseline detection algorithm) should be above a threshold value before deciding that a portion of the signal represents a peak.
    and 2) slope ought to be above threshold in order to separate a peak from baseline drift.

    I find that, whenever I have had to do something like this, I have almost always started with a column calculating slope. Perhaps slope alone can do both baseline detection (whenever slope is within threshold of 0 with some way of distinguishing 0 slopes at baseline and 0 slopes at the top of peaks) and peak start/stop detection (peak start is when slope goes from near 0 to above some positive value. peak end is when slope goes from some negative value below a threshold and then becomes 0/baseline). (Edit to add -- I see that someone else had a similar idea to this one).

    Does that help think through some basic ideas?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  8. #8
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    Thank you so much, that worked out very well!

    I just now have another task...

    I need to gather all the data, which lie in between the data of the start and end of one step because I need to sum them up for further calculation .
    The hole process is about transforming pressure into force.

    Can you help me there as well?

    Thanks a lot!

  9. #9
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    Thanks for your help and opinion!

    I don't need to defend what I did and I don't need to explain how I filtered my data at least not so detailed. It just has to make sense and needs to be equal for every calculation.

    The threshold topic you mentioned is another thing I need to use (where I probably need some help as well^^) for the force curve which I need to create and analyse.

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: detecting steep rises and drops of data

    I need to gather all the data, which lie in between the data of the start and end of one step because I need to sum them up for further calculation .
    The hole process is about transforming pressure into force.
    That sounds like, after identifying each peak, you need to integrate each peak. Usually, I would expect to see a baseline algorithm of some kind that numerically describes the baseline at the bottom of the peak. Assuming the baseline is approximated as straightlines, one usually ends up, then, with a series of trapezoids that you can find the area of, then add all those trapezoids up.

  11. #11
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    sounds like a plan!

    I will try that.

    Thanks a lot!

  12. #12
    Registered User
    Join Date
    06-24-2022
    Location
    Munich, Germany
    MS-Off Ver
    Windows 365
    Posts
    16

    Re: detecting steep rises and drops of data

    Hey,

    thank you so much about the last tip you gave me about how to recognize when a step starts. Unfortunately a problem occured when I wanted
    to do the same for with other data. I don't know what the problem is, the x for the end and beginning is appearing to often even if
    it is in the middle of the step.

    Do you know how to handle that, I would be so thankful!

    best regards
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: detecting steep rises and drops of data

    It appears that we are back to the peak detection part of the algorithm. Reverse engineering the existing peak detection algorithm suggests that the current peak start/end algorithm is:

    Peak start: look at a 12 or so point window and find windows where only the last point's change is above threshold
    peak end: look at a 12 or so point window and find windows where only the first point's change is above threshold

    In the example given, the top of the peak (where the change is "small") is broad enough to cause a false positive with this peak detection algorithm. I expect that changing the "width" of the window (18, 20, 30 points instead of around 12???) will resolve this one.

    One parameter I see in the peak detection software I use is a "peak width" parameter that tries to give the software some idea of how narrow/wide the peaks are expected to be. Right now, your "peak width" is hard coded in the spreadsheet formulas. Adding another parameter that makes "width" a user selectable variable adds a layer of complexity to the programming (probably an OFFSET() function). Is it worth the effort to add a layer of complexity to the formulas, or is this something that you can change in the formulas manually?

    At this point, it feels to me like we are back to peak detection. You might need to come up with a good, representative sample of the kinds of peaks you expect to see (a representative sample of widths with and without shoulders, since your latest example also has a shoulder on the upslope of the peak) so that the peak detection algorithm can be thoroughly developed and tested.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hi everyone - A steep learning curve & help needed!
    By Flagon in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 05-13-2020, 04:47 PM
  2. Detecting when data drops off & moving rows to amother sheet
    By Bycote in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2019, 12:21 PM
  3. Detecting when data drops off
    By Bycote in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-23-2019, 10:39 AM
  4. [SOLVED] Rank Pay Rises for Person by Date
    By watchouse in forum Excel General
    Replies: 10
    Last Post: 03-26-2018, 08:37 AM
  5. Formula drops in a cell w/ Data Validation
    By donyadaniels76 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-26-2016, 08:02 PM
  6. Morning All, Loving the steep learning curve in the world of VBA!
    By roofletch in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-26-2013, 11:16 AM
  7. A macro to help me enter data per row and then drops down to the next row to input more.
    By DorothyFan1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2012, 10:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1