1

I am trying to estimate the amplitude of a signal in MATLAB:

signal

As can be seen, I can't simply take the max() and min() to get the amplitude. The signal continually wanders, and in any case isn't constant. However, all that I'm looking for is an average - one single figure that estimates the average amplitude of the dominant component in the figure above (which repeats eight times). Visually, it's fairly obvious what I'm trying to find out. Programatically however...

I have heard tell of 'Hilbert transform' - hilbert() - and 'fast fourier transform' - fft() - but have very little knowledge of signal analysis - and wonder if anyone might be able to steer me in the right direction, or explain how to utilise either of these functions. My data is simply a float stored in a one-dimensional array at 1000Hz.

Any help gratefully received!

CaptainProg
  • 5,610
  • 23
  • 71
  • 116

2 Answers2

2

You have several options, the easiest of which would be:

  1. Use a peak detector to find local extrema. You can find several on the MathWorks File Exchange.
  2. Apply a high pass filter to remove the baseline drift, then find the absolute minimum and maximum
Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
  • @CaptainProg: I used the same one as a starting point when I was getting started. It was a nice clean implementation of the ideas I'd been thinking of, and writing my own improved version was easier when I had working code to compare results with. – Ben Voigt Feb 13 '12 at 00:39
1

In order to extract the peak-to-peak amplitude, you may first apply detrend to your dataset.

zellus
  • 9,617
  • 5
  • 39
  • 56