How to take the double integral of a data set with respect to time

Click For Summary
SUMMARY

The discussion focuses on calculating the double integral of acceleration data to determine displacement over time, specifically in the context of real-time computations on an Arduino. The integral expressions provided are $$\int_0^T \int_0^T \ddot {\vec \theta(t)}dtdt$$ for acceleration and $$\int_0^T \left(\dot{\vec \theta(0)}+ \int_0^T \ddot {\vec \theta(t)}dt\right)dt$$ for displacement. Key challenges include error accumulation in acceleration measurements and the necessity for a zero restoration algorithm to mitigate bias in velocity calculations. Participants also discussed numerical integration methods and the use of scientific subroutine packages for accurate computations.

PREREQUISITES
  • Understanding of double integrals and their applications in physics.
  • Familiarity with numerical integration algorithms.
  • Experience with real-time data processing on Arduino platforms.
  • Knowledge of PID control loops and error correction techniques.
NEXT STEPS
  • Research numerical integration methods suitable for discrete data sets.
  • Explore Arduino libraries for real-time data processing and integration.
  • Study zero restoration algorithms to correct for accumulated errors in sensor data.
  • Learn about PID control loop implementation in embedded systems.
USEFUL FOR

Engineers, embedded systems developers, and researchers working on real-time data integration and control systems, particularly those utilizing Arduino for motion tracking and displacement calculations.

Leo Liu
Messages
353
Reaction score
156
Question: Suppose I have a data file for the acceleration of an object after every ##
\Delta t_i##, how do I obtain the displacement of it?

Context: Integral in a PID loop, although not exactly what I am asking as one is sum of error: $$\int_0^T \int_0^T \ddot {\vec \theta(t)}dtdt$$
the other is displacement:
$$\int_0^T \left(\dot{\vec \theta(0)}+ \int_0^T \ddot {\vec \theta(t)}dt\right)dt$$

PS I found http://mathforcollege.com/nm/mws/gen/07int/mws_gen_int_spe_trapdiscrete.pdf but it is for single integral over discrete data.
 
Technology news on Phys.org
There are a variety of numerical integration algorithms. If you have a particular scientific subroutine package, you should check whether it has an appropriate subroutine. If you are using Excel, this is a simple example
 
  • Like
Likes   Reactions: Leo Liu
FactChecker said:
There are a variety of numerical integration algorithms. If you have a particular scientific subroutine package, you should check whether it has an appropriate subroutine. If you are using Excel, this is a simple example
Can I do this on an Arduino? It needs to be computed real time.
 
Leo Liu said:
Can I do this on an Arduino? It needs to be computed real time.
That seems very different from integrating data in a file.
 
Leo Liu said:
Can I do this on an Arduino? It needs to be computed real time.
Yes.
Keep a running total of the acceleration, which is velocity.
Keep a running total of the velocity, which is displacement.

The problem you will have is that a zero error in the acceleration will accumulate until your displacement exceeds some sensible limit. There will need to be some zero restoration algorithm introduced. You have two unknown constants of integration at the start.
 
Baluncore said:
The problem you will have is that a zero error in the acceleration will accumulate until your displacement exceeds some sensible limit. There will need to be some zero restoration algorithm introduced.
Could you elaborate, please?
 
Errors accumulate with time.
A DC offset error in the acceleration will always bias and drive the velocity one way.
You will need to detect and cancel that error somehow, by knowing the actual displacement at a zero crossing or some ± reference or limit.
 
  • Like
Likes   Reactions: Leo Liu
One more question:
Suppose the acceleration ##\ddot x## is approximately constant during a finite ##
\Delta t##, is the displacement due to this contribution best described by ##\frac 1 2 \ddot x (\Delta t)^2## or ##(\ddot x \Delta t)\Delta t##?
 

Similar threads

Replies
3
Views
3K
Replies
5
Views
2K
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 27 ·
Replies
27
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K