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

In summary, the displacement is best described by the product of the acceleration and the time derivative of the displacement.
  • #1
Leo Liu
353
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
  • #2
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 Leo Liu
  • #3
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.
 
  • #4
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.
 
  • #5
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.
 
  • #6
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?
 
  • #7
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 Leo Liu
  • #8
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##?
 

1. How do I determine the limits of integration when taking the double integral of a data set with respect to time?

The limits of integration for a double integral with respect to time can be determined by examining the time range of the data set. The lower limit of integration will be the earliest time point in the data set, and the upper limit will be the latest time point. If the data set covers a continuous time period, the limits will be the same for both integrals. However, if the data set has gaps in time, the limits may differ for each integral.

2. What is the difference between a single integral and a double integral with respect to time?

A single integral with respect to time calculates the total change in a variable over a specified time interval. A double integral with respect to time calculates the accumulated change in a variable over a specific time period, taking into account the rate of change at each time point. Essentially, a double integral is a more precise calculation that takes into account the rate of change over time.

3. Can a double integral with respect to time be used to find the average rate of change of a variable?

Yes, a double integral with respect to time can be used to find the average rate of change of a variable. The average rate of change is equal to the total change in the variable divided by the total time interval. The double integral will calculate the total change, and dividing by the time interval will give the average rate of change.

4. How can I use the results of a double integral with respect to time in my analysis?

The results of a double integral with respect to time can be used to understand the overall change in a variable over a specific time period. This information can be used to make predictions about future trends or to compare different data sets. Additionally, the rate of change over time can provide valuable insights into the behavior of the variable being studied.

5. Are there any limitations to using a double integral with respect to time?

One limitation of using a double integral with respect to time is that it assumes a constant rate of change between data points. This may not always be the case, especially if there are gaps in the data or if the data has a high degree of variability. Additionally, the accuracy of the results may be affected by the quality of the data and the chosen limits of integration.

Similar threads

Replies
3
Views
1K
  • Classical Physics
Replies
0
Views
147
  • Introductory Physics Homework Help
Replies
27
Views
3K
  • Programming and Computer Science
Replies
8
Views
1K
  • Classical Physics
Replies
0
Views
83
  • Differential Equations
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
999
  • Introductory Physics Homework Help
Replies
16
Views
1K
Replies
2
Views
2K
Replies
6
Views
962
Back
Top