I'm working on analyzing some data from a grain boundary in an atomic simulation. I've got a lot of similar data to go through and am trying to determine a reliable way to get the amplitude of my data. I've been using MatLab but have very little experience with signal analysis. The signal processing apps within MatLab tend to get confused by the "false peaks" and "false valleys", and most don't even work in the first place unless my x-axis is sorted to only increase since there is some slight "shaking" forward and backward along the x-axis. The apps that do somewhat well at identifying peaks all greatly attenuate the amplitude and I think it is due to a low sampling rate.

I don't know how to implement it, but one plan I am looking into uses a fourier decomposition to build a less-noisy signal with the same periodicity. I could then normalize this to have an amplitude of +/- 1 and then scale back to the original amplitude using MatLab commands that envelope the top and bottom of my original signal. What are some ways I could go about this? Are there other solutions that would work better than my described plan?

Thank you for your help!

Unsorted Data

Data sorted along x-axis

  • $\begingroup$ So you’re trying to get the envelope of this signal? $\endgroup$
    – Jdip
    Commented May 10 at 21:19
  • $\begingroup$ Do you know what a low pass filter is? $\endgroup$
    – Jdip
    Commented May 10 at 21:20
  • 1
    $\begingroup$ So your X-axis is NOT monotonic? Is it unique then? Is there always the same energy at the same position (in case you have duplicates or near duplicates) $\endgroup$
    – Hilmar
    Commented May 11 at 12:26
  • $\begingroup$ To stress a bit what Hilmar said: your zoomed-in "black" signal seems to be actually a curve in 2D space, whereas your "red" signal seems to be a 1D signal (energy over position). That makes these two superficially similar graphs hard to compare. Is this an artifact of how you simulate? $\endgroup$ Commented May 12 at 16:38
  • $\begingroup$ The original "position" for the x-axis is actually an average position of multiple atoms (all part of a migrating grain boundary) along one axis. Since the shape of the grain boundary shifts and changes, the average position gets shifted forward and back. Sorting the positions might be changing "apples to oranges". $\endgroup$
    – Kenefactor
    Commented May 13 at 18:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.