Using MATLAB to Integrate Data that has a Sinusoidal Signature

3 views (last 30 days)
Hello,
I am currently working with datasets that yield angular rate in radians/sec. The plots from this rate data are sinusoidal, and I need to find the angles in radians. I attempted to use the cumtrapz MATLAB function, and it integrates (I can retrieve the original signal via delta_integrated_data/delta_time); however, I don't think it is integrating correctly based on the nature of the signal, i.e., a signal with amplitude, phase, and frequency. I was expecting something that resembled -cosine +C since the original signal resembled sine. I attached a figure of the angular rate and a figure of the integrated angular rate. Is there an alternate approach that could be taken? Would using the symbolic toolbox somehow be better? Or, am I overthinking this matter? Feedback is much appreciated. Thanks!

Accepted Answer

Star Strider
Star Strider on 10 Nov 2017
The ‘Angular Rate’ signal is offset from zero (the mean appears to be 0.06), and cumtrapz is integrating that constant offset (as a constant-of-integration) as well.
I would subtract the mean of your ‘Angular Rate’ signal from your ‘Angular Rate’ signal before integrating it.
  5 Comments
C. Robinson
C. Robinson on 11 Nov 2017
That makes sense. Thanks again for the help! Your feedback is very clear.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!