0
$\begingroup$

I know four common methods for numerical integration of signals such as Midpoint, Trapezoid, Simpson's rule, and FFT integration property. Are there other methods?

$\endgroup$
12
  • 2
    $\begingroup$ Even basic Euler can have higher than double precision given enough sampling rate. What exactly are you interested in? For example, trapezoidal is used in SPICE engines and it's only limited to the *tol parameters -- which can be used with arbitrary precision, if you have enough coffee. $\endgroup$ Nov 10, 2022 at 13:29
  • 1
    $\begingroup$ Sounds to me you should be fine with the ones you've already mentioned but, you know better the precise context of what you need. I'll just say that, if this is part of a loop (e.g. dynamic) then even simple Euler will suffice (simple number crunching for the uC + the loop will compensate), and if it's offline, even a bilinear will do remarkably well for sampling 10x or better. $\endgroup$ Nov 10, 2022 at 13:40
  • 3
    $\begingroup$ If you're integrating acceleration to get displacement, then a better integration method won't save you. The noise and measurement error of the acceleration is already enough to make the problem unfeasible and the uncertainty of the initial conditions is adding a lot on top. You can easily estimate the accumulated error with time and then understand that any reasonable medium to long term displacement predictions are impossible without support from other sensors. $\endgroup$
    – Jazzmaniac
    Nov 10, 2022 at 14:28
  • 1
    $\begingroup$ @YazanAlatoom that's really the point here: you want to calculate some theoretical function on all the previous signal, call it "Integral". But how well that function gets approximated by your actual numerical method is a question that needs a precise definition of "well". You write "accuracy"; but accurate / true to what "true value"? This depends on what you're trying to integrate, for what purpose. So Jdip asking to clarify whether you're integrating acceleration to get displacement or integrating displacement (which I agree makes little sense) is necessary. $\endgroup$ Nov 10, 2022 at 18:51
  • 2
    $\begingroup$ "I am trying to integrate displacement from acceleration data." so, you want to integrate acceleration data? $\endgroup$ Nov 10, 2022 at 19:27

1 Answer 1

1
$\begingroup$

Forward Euler method:

$y(n) = y(n-1) + K*[t(n) - t(n-1)]*u(n-1)$

Backward Euler method:

$y(n) = y(n-1) + K*[t(n) - t(n-1)]*u(n)$

Trapezoidal method:

$y(n) = y(n-1) + K*[t(n)-t(n-1)]*[u(n)+u(n-1)]/2$

Source: https://www.mathworks.com/help/simulink/slref/discretetimeintegrator.html

$\endgroup$
1
  • $\begingroup$ Thanks a lot... $\endgroup$ Nov 10, 2022 at 19:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.